Shell Extension for MSBuild

posted @ Friday, August 26, 2005 2:24 AM


I really enjoy having the shell extension for NAnt; I can quickly right-click on my build file without directly navigating to a command prompt. For the client I have been working with recently, we are using Visual Studio 2005 Beta 2, enter MSBuild. MSBuild is a great tool, but I discovered they don't already have a context menu for their .*proj files. Adding the following entries to the registry will give you a right click menu to launch MSBuild for any of the .*proj files:

  • Navigate to HKEY\CLASSES\ROOT\*
  • Add a new key called “shell“ if it doesn't already exist.
  • Add a key below “shell“ and title it “Run with MSBuild“
  • Add a key below “Run with MSBuild“ called “command“
  • Edit the default value for “command“ to be the following:
    cmd /k ""C:\Program Files\Microsoft Visual Studio 8\VC\bin\vcvars32.bat"" && msbuild