Build Your Solutions from the Context Menu
Sept 2nd 2009 | Jimmy Bosse
Build Your Solutions from the Context Menu
Many times you want to quickly refresh your solution from the repository and quickly build it without having to open Visual Studio. Follow these simple steps to add a Registry Key that will add a context menu for you solution files.
Launch RegEdit: Start > Run > type regedit > click OK.
Navigate to HKEY_CLASSES_ROOT > SystemFileAssociations.
If there is no “.sln” key, add a key for “.sln”.
If there is no key for “shell” in “.sln” then add a key for “shell”.
Add a “Build Solution” key in “shell”.
Add a “command” key to “Build Solution”.
Set the default value for command to:
cmd.exe /k “call “%%VS90COMNTOOLS%%\vsvars32.bat” x86&&msbuild “”%1″” /p:Configuration=Debug /t:Rebuild /l:FileLogger,Microsoft.Build.Engine;logfile=MSBuildDebug.log&&pause&&exit”
Reboot, and now you can build your solution file from the context menu.
Tada!
Note that this specific entry will only build debug builds for 2008 solutions. You can modify the VS90COMNTOOLS and Configuration=Debug to add entries for other versions of Visual Studio and other build configurations.
Jimmy Bosse is a Team Lead at Thycotic Software, an agile software consulting and product development company based in Washington DC. Secret Server is our flagship enterprise password management product.