Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a new Visual Studio solution on the desktop using the context menu?

Years ago, using VS2005, I had a setup where I could right-click on the desktop/folder, select New, select Visual Studio 2005 solution and it would create a solution for me right there. I can't remember how I did this.

Does something like this exist for VS2008 or VS2010? It would be really handy.

EDIT: Figured it out based on the links in the answers (and also found an old email to myself).

1. Create a registry file (.reg) with the following content, then execute it:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.sln\ShellNew] 
"FileName"="Visual Studio Solution.sln"

2. Create a new file called Visual Studio Solution.sln in C:\Windows\ShellNew folder with the following content:

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Global
  GlobalSection(SolutionProperties) = preSolution
    HideSolutionNode = FALSE
  EndGlobalSection
EndGlobal

3. Reboot Windows and you'll have yourself a context menu.

like image 526
AngryHacker Avatar asked Jul 14 '11 21:07

AngryHacker


People also ask

How do I create a solution in Visual Studio?

To build or rebuild a single projectIn Solution Explorer, choose or open the project. On the menu bar, choose Build, and then choose either Build ProjectName or Rebuild ProjectName. Choose Build ProjectName to build only those project components that have changed since the most recent build.

How do I create a new solution from an existing solution in Visual Studio?

On the menu bar, select File > New > Project. On the Create a new project page, type solution into the search box. Select the Blank Solution template, and then click Next. Enter Name and Location values for your solution, and then select Create.

What is context menu in Visual Studio?

Visual Basic Context menus are the menus that pop up when the user clicks with the right hand mouse button over a control or area in a form. They are called context menus because the menu is usually specific to the object over which the mouse was clicked.

How do I create a new project in Visual Studio?

If the Visual Studio development environment is already open, you can create a new project by choosing File > New > Project on the menu bar. You can also select the New Project button on the toolbar, or press Ctrl+Shift+N.


3 Answers

I used to use what I think you are looking for. It was done with a little registry update (.reg) file whose contents start like this

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.sln\ShellNew]

"Data"=hex:EF,BB,BF,D,A,4D,

of which this is just a snippet, and it was for an earlier version of VS. But this might be enough to jog your memory, or give you something to google for. See here for more

http://flux88.com/2009/03/right-click-new-visual-studio-solution/

edit..

also see http://visualstudiohacks.com/registry-hacks/create-solutions-without-folders/

like image 142
hatchet - done with SOverflow Avatar answered Oct 21 '22 23:10

hatchet - done with SOverflow


I believe the Team Foundation Server edition of Visual Studio does that, either stand alone or with the Team Foundation Server Power Tools, which the Power Tools site says it has Windows Shell Extensions.

Also Codeplex hosts MSBuildShellExtension which is a little off topic for what your looking for, but its nice because it lets you build your project from any directory on your hard drive, without ever having to launch Visual Studio.

like image 32
Icemanind Avatar answered Oct 21 '22 21:10

Icemanind


1) In Visual Studio 2010, use the "Blank Solution" project to create a solution.
2) Copy that SLN file into "%SystemRoot%\ShellNew".
3) In RegEdit, go to HKEY_CLASSES_ROOT.sln
4) If a key (folder) for "ShellNew" does not yet exist under .sln, create it.
5) Create a string value under ".sln" with a name of "Filename" and the filename of the SLN file for its data.

Done. No restart necessary.

REF: http://support.microsoft.com/kb/140333

like image 20
Dustin Oprea Avatar answered Oct 21 '22 22:10

Dustin Oprea