Hey WebStorm, don’t search in the node_modules folder!

How annoying is that whatever you search for in a node.js project, WebStorm gives you thousand hits from the node_modules folder?

Calm down, and go to the Project window, right click on the problematic folder, and click Mark Directory As –> Excluded:

webstorm-exclude-folder-from-search

The folder won’t disappear from the Project window, but won’t pollute your search results any more.

You can undo this in the same place: Mark Directory As –> Cancel Exclusion

webstorm-exclude-folder-from-search-cancel

 

Technorati-címkék: ,
Advertisements

I asked for a .vs folder and the Visual Studio team gave it to me

You probably noticed, that Visual Studio creates new files in your solution folder whether you like it or not. One of those files is the Solution User Options file with the .suo extension, which contains settings specific to the given developer machine. You can delete it, but it will quickly grow back.

vs_2013_suo

You have to be careful with these per-developer or per-machine setting files, especially because you should not add them to source control. Not a coincidence that *.suo is the first item in the .gitignore file recommended for Visual Studio projects.

Unfortunately .suo is not the only file like that, you can see many of these polluting your project root when you are using different project types. It would be much cleaner if all those files would live in a single folder!

Thankfully it is already solved in Visual Studio 2015, and the IDE puts them into a separate directory which is called .vs similarly to other development environments:

vs_2015_suo

The .vs is a hidden folder so you have to enable the Show hidden files, folders, and drives option in Windows Explorer if you want to peek into it (but why would you?). Currently (Visual Studio 2015 CTP6) the .suo file and the Visual Basic/C# IntelliSense database files are living in this folder and its subfolders, but in the future releases more and more files will be moved here, and hopefully this practice will be followed by add-in developers as well. If you are upgrading an existing solution, the old files will not be deleted automatically, so your settings are not lost if you open the project later with an earlier version of Visual Studio.

The best thing in this feature is that this folder was not invented by the Visual Studio developer team. It is there because I asked for it. I and 2822 other Visual Studio users on the Visual Studio UserVoice page. The IDE team looked at it, thought it through, accepted it and implemented it.

It feels so good, when developers listen to the end-users.

 

Technorati Tags:

Updating node.js on Windows

Last week the node.js team released version 0.10.36, which was much anticipated by many of us, as it contains a fix for a debugger and strict mode regression issue.

If you are working on a Windows machine, the easiest was to update your node.js runtime is to download the latest MSI installer, and go through it with next-next-finish. After that you can use the node –v command to verify the version number of your local installation.

 

Technorati-címkék:

You don’t have permission to mount the file

You can get the following error message in Windows 8 when you try to mount an ISO file with Windows Explorer:

“You don’t have permission to mount the file.”

 

no-permission-to-mount-the-file

Don’t panic, it is a false alarm, the ISO is successfully mounted, just check it in My Computer.

 

Technorati Tags: ,,

The file is there, but returns with 404

I am trying to load an ASPX URL, but it fails. Well, it loads when I try from IIS Express with the source code, but after I publish it to IIS, it fails with 404.

The file is right there where it should be, it just cannot be downloaded. I turn on Failed Request Tracing, hopefully it will show something. It does: 388 log entries for a single HTTP request. Fortunately the Request Summary view highlights the only warning:

MODULE_SET_RESPONSE_ERROR_STATUS

ModuleName: ManagedPipelineHandler

Notification: EXECUTE_REQUEST_HANDLER

HttpStatus: 404

HttpReason: Not Found

HttpSubStatus: 0

ErrorCode: The operation completed successfully. (0x0)

Not a big help, but it shows which module is guilty. Little joy. I look up the entry in the Complete Request Trace and check the previous entries. AspNetParse and AspNetCompile entries. Hmmm, maybe something is wrong with the ASPX file? Probably not, because it runs on IIS Express, and I have it from a NuGet package.

Anyway, I check the source code. The first line looks suspicious: the @Page directive contains a CodeFile attribute. Unusual. I change it to CodeBehind. Compile, publish.

It works.

 

Technorati-címkék: ,,

Too much column guides in Visual Studio

You installed the Productivity Power Tools extension because you wanted to have nice vertical column guides in Visual Studio, but before you could set one they appeared everywhere?

vs-guidelines-too-much

What’s more you cannot get rid of them, because even if you click exactly the line the Remove Guideline option in the context menu remains disabled?

vs-guidelines-menu-disabled

Here is the solution: turn off not the Column Guides, but instead the Structure Visualizer in the Options dialog:

vs-guidelines-options

With that you will lose some tooltip features as well, but at least now it is totally up to you where you want to display column guides.

 

Technorati-címkék:

Visual Studio: Unable to check out the current file

I’ve received the following error message in Visual Studio right after I’ve tried to add a new service reference:

Unable to check out the current file.  The file may be read-only or locked, or you may need to check the file out manually.

The message was really strange because the Add Service Reference dialog seemed to recognize the service perfectly, and although the project was under source control, we have Git on the server so “check out” did not seem to be the right term here.

The sad truth is that the above error message is completely wrong and the issue has nothing to do with source control. The solution is to click the Advanced button in the Add Service Reference dialog, then click the Add Web Reference button and use the old Add Web Reference dialog to add that particular service to your project even if the URL points to a .svc file.

 

Technorati-címkék: ,,