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 em开发者_StackOverflowail 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.
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/
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.
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
精彩评论