Sometimes all I want to do is build a particular solution without firing up
vstudio in GUI mode and then wait whilst source control get its act together
etc. Anyway I've found a nifty solution to this by adding some extra file
associations. So here is how you do it:
First some assumptions:
~~~~~~~~~~~~~~~~
1. The paths to devenv are based on the default install directory on my
machine; yours maybe different so you may have to tweak the path accordingly
(in step 5).
2. This will only work with solutions that contain release / debug builds.
Having said that you can change or add more associations where appropriate.
How to do it
~~~~~~~~~
1. Fire up the file explorer and select menu Tools->Folder Options.
2. Select the File Types tab.
3. Select from the list file type SLN and then press the Advanced Buton.
4. Click on New button and fill in Action name to be "Build Debug"
5. copy and paste the following text into the "Application ued to perform
action" edit:
cmd.exe /k ""c:\program files\Microsoft Visual Studio .NET
2003\Common7\IDE\devenv" "%1" /build debug"
6. Click on ok.
7. Repeat steps 4 -> 6 but replace the word Debug for Release in both
"Action" edit and use the following text for the "Application ued to perform
action" edit:
cmd.exe /k ""c:\program files\Microsoft Visual Studio .NET
2003\Common7\IDE\devenv" "%1" /build release"
How to use it
~~~~~~~~~
Simply right click on the .SLN file of choce and from the menu select either
Build Debug or Build Release.
Lee