Visual-studio – How to get Program Files Path in Visual Studio configuration

nunitvisual studio

I followed this tutorial to make NUnit tests debugable in Visual Studio. In the debugging options I set "Start external program:" to C:\Program Files\NUnit 2.4.8\bin\nunit-x86.exe.
Is there a way to get the program files directory dynamically to avoid problems when other people work with this solution on their system?

Best Answer

The environment variable $PROGRAMFILES holds this. Most properties in visual studio allow you to use environment variable expansion like this: "$(PROGRAMFILES)\NUnit 2.4.8\"