Tuesday 28 April 2015

Create a Visual Studio 2013 solution from Windows Explorer's New Context Menu

I have always found the workflow for creating a new Visual Studio solution from within Visual Studio to be somewhat inefficient.  I never seem to get the project and solution in the folders I want them in and just about always end up closing Visual Studio after creating a new solution just so I can move the solution file to where I wanted it in the first place.

For me a much better workflow is to navigate to the location where I want to create my solution in Windows Explorer and then to right-click and from the New Context menu select "Microsoft Visual Studio Solution".

The problem is that this functionality isn't available out of the box.

Good news is that it's not too tricky to set up.  Here are the steps to add the ability to create a Visual Studio solution to your New Context menu.


  • In Visual Studio, create a new Visual Studio Solution and name it VisualStudioTemplate.sln
  • Close Visual Studio and then copy the VisualStudioTemplate.sln to c:\Windows\ShellNew
  • Open RegEdit and navigate to HKEY_CLASSES_ROOT\.sln\
  • Create a new Key called ShellNew
  • Click in the right hand pane and create a new string value and enter "FileName"
  • Right click on the newly created "FileName" string value and select Modify...
  • Enter VisualStudioTemplate.sln into the Value data field and hit enter
  • Close regedit

That's it you should now be able to create a new Visual Studio solution from the Windows Explorer New Context menu.



No comments:

Post a Comment