How do I set a path in Visual Studio?

yesraaj picture yesraaj · Jan 9, 2009 · Viewed 244.6k times · Source

How do I set a path for DLL files to be searched in Visual Studio for a particular project alone?

Now I am setting it in the environment path variable, but I would like better control over this.

Answer

Multicollinearity picture Multicollinearity · May 26, 2010

Search MSDN for "How to: Set Environment Variables for Projects". (It's Project>Properties>Configuration Properties>Debugging "Environment" and "Merge Environment" properties for those who are in a rush.)

The syntax is NAME=VALUE and macros can be used (for example, $(OutDir)).

For example, to prepend C:\Windows\Temp to the PATH:

PATH=C:\WINDOWS\Temp;%PATH%

Similarly, to append $(TargetDir)\DLLS to the PATH:

PATH=%PATH%;$(TargetDir)\DLLS