bpeikes
bpeikes

Reputation: 3705

How would you manage environment variables in VS that should be solution based?

We have the paths to our 3rd party libraries in separate environment variables. Example: LIB1_SDK=c:\Program Files\lib1\1.0 LIB2_SDK=c:\Program Files\lib2\3.0 etc...

In our projects we add the following to the include path: $(LIB1_SDK)/include, $(LIB2_SDK)/include

The problem is that you can't reliably create a build this way because your build depends on environment variables which are not part of the solution or project.

One solution would be to switch to using environment variables LIB1_SDK_V1, LIB2_SDK_V3, etc. but then you run into the problem that if you want to build a solution, with multiple projects, you can't easily change them all to a different version of a particular library.

Ideally, we would be able to set environment variables at the solution level. That way you could branch a solution and try updating to a new version of a 3rd party library.

What's the best way to manage 3rd party includes and dll's using Visual Studio?

BTW, we're using VS 2008, VS 2010 and TFS.

Upvotes: 0

Views: 97

Answers (1)

Xyand
Xyand

Reputation: 4488

In VS2010 we use a "Project Property Sheet" common to all projects in the solution.

Upvotes: 1

Related Questions