tags:

views:

77

answers:

1

I'm creating a vsprops file to contain include and lib paths that are common to all projects in my solution.

However, I have platform specific paths for the lib paths which can be Win32/x64. Is it possible to put these settings in one vsprops file? Or do I have to create a different vsprops file for each platform and then spend time with the Property Manager in visual studio to ensure the correct ones are referenced?

+1  A: 

I have a similar problem and my solution is to reference environment variables in my vsprops file that point to the correct directories. I then launch Visual Studio via shell links to batch files that set the appropriate environment and then launch VS. Since VS is launched from cmd.exe, it gets the environment of cmd.exe at the time it was launched and therefore has the right environment variable settings. Here's an example:

LaunchTrunk.bat:

set VR_ROOT=C:\VR\trunk
SET ACE_ROOT=C:\VR\trunk\Imports\ACE_wrappers9
set PATH=c:\VR\trunk\source\builtcomponents\release\vrsystem;C:\VR\Patch\Imports\ACE_wrappers9\bin;%PATH%
start "devenv" /D"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE" "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /nosplash
David Gladfelter
Thanks, an interesting idea. Not sure it will really work for me, my aim is to avoid any new developers from having to do anything special to get up and building our code. This is a bit too special for me.
Scott Langham