Robert Smith wrote:

I added the following to my .build to get past this issue when building C++…

<setenv>

<variable name="VSINSTALLDIR" value="C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\IDE"/>

<variable name="VCINSTALLDIR" value="C:\Program Files\Microsoft Visual Studio .NET 2003"/>

<variable name="FrameworkDir" value="C:\WINDOWS\Microsoft.NET\Framework"/>

<variable name="FrameworkVersion" value="1.1.4322"/>

<variable name="FrameworkSDKDir" value="C:\Program Files\Microsoft.NET\SDK\v1.1"/>

<variable name="DevEnvDir" value="%VSINSTALLDIR%"/>

<variable name="MSVCDir" value="%VCINSTALLDIR%\VC7"/>

<variable name="PATH" value="%DevEnvDir%;%MSVCDir%\BIN;%VCINSTALLDIR%\Common7\Tools;%VCINSTALLDIR%\Common7\IDE;%VCINSTALLDIR%\Common7\Tools\bin\prerelease;%VCINSTALLDIR%\Common7\Tools\bin;%FrameworkSDKDir%\bin;%FrameworkDir%\%FrameworkVersion%;%PATH%;"/>

<variable name="INCLUDE" value="%MSVCDir%\ATLMFC\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\PlatformSDK\include\prerelease;%MSVCDir%\PlatformSDK\include;%FrameworkSDKDir%\include;%INCLUDE%;"/>

<variable name="LIB" value="%MSVCDir%\ATLMFC\LIB;%MSVCDir%\LIB;%MSVCDir%\PlatformSDK\lib\prerelease;%MSVCDir%\PlatformSDK\lib;%FrameworkSDKDir%\lib;%LIB%;"/>

</setenv>

For our purposes (just C# and C++) I've found that the only ones really needed are PATH, LIB, and INCLUDE. I believe that most of the others are only used to simplify the .bat file, and aren't actually used by Visual Studio.

Also, a better way to deal with the directories is to get them from the registry instead of hardwiring them. I use tasks such as:

<readregistry
property="vs.2003.vs"
key="Software\Microsoft\VisualStudio\7.1\Setup\VS\ProductDir"
hive="LocalMachine" />

to get the install directory.

Gary



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September
19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nant-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to