views:

127

answers:

2

I would like to add a right click menu option to Windows explorer for all .sln files that says "Build." It just needs to call devenv to build the sln without opening it first. What is the easiest way to do this?

Note that I am using Windows Vista, if that matters.

Solution

I found a simple solution. Create and run .Reg file with this:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build (Debug)\command]
@="\"C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\devenv.com\" %1 /Build Debug"

And make sure the path to Visual Studio is correct.

+2  A: 

You would be needing to write a shell extension. See:

http://www.theserverside.net/tt/articles/showarticle.tss?id=ShellExtensions

David in Dakota
A: 

Create and run .Reg file with this and make sure the path to Visual Studio is correct.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Build (Debug)\command]
@="\"C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7\\IDE\\devenv.com\" %1 /Build Debug"
NotDan