3

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?

Scott Langham
  • 58,735
  • 39
  • 131
  • 204
  • Not an ideal solution, but since property sheets can inherit from each others, you can define a platform-specific vsprops which defines only the platform-specific properties, and inherits everything else from a common platform-agnostic vsprops file. Also note than in VS10, the move to MSBuild might enable some more flexible options – jalf Feb 18 '10 at 16:23

2 Answers2

1

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
  • 4,175
  • 2
  • 25
  • 25
  • 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 Feb 18 '10 at 16:12
1

No, there doesn't seem to be a way, I ended up creating two different vs props files.

Scott Langham
  • 58,735
  • 39
  • 131
  • 204