|
#1
|
|||
|
|||
How to compile using Visual Studio .Net 2003
I have both versions of visual studio .net on my machine and visual build always uses visual studio .net 2002 for compiling of projects. How can I tell visual build to use visual studio .net 2002 or 2003?
|
#2
|
|||
|
|||
We use a mixture of 7.0 and 7.1 projects and use VSCompile in the attached JScript to figure out which compiler to use for a particular solution.
VS7_0 and VS7_1 are macros that contain the path to the compiler (C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE\devenv.exe for the 7.1 compiler for example). We call the VSCompile function from a "Run Program" step with command line options following the function call: [VSCompile ("solution.sln")] /build release /project "aProject" /Out "LogFile.log" |
#3
|
|||
|
|||
Great idea! And if you want to use the Make VS.NET action to build the solution, you could put %VS[VSCompilerVer("solution.sln")]% part in the 'Override default location' field on the Options tab. Note that the sample requires that JScript be set as your default script language (Tools | Application Options | General).
Attached is a VBScript version that looks up and returns the actual location of the compiler executable. You could paste this code into your global scripts (View | Script Editor | Global tab) and then put [VSCompilerExe("solution.sln")] in the override field of the Make VS.NET action. And we'll also put it on the list to support this instrinsically in the Make VS.NET action. |
|
|