title: How do I set specific environment variables when debugging in Visual Studio?
body: <p>On a class library project, I set the "Start Action" on the Debug tab of the project properties to "Start external program" (<a href="http://en.wikipedia.org/wiki/NUnit" rel="noreferrer">NUnit</a> in this case). I want to set an environment variable in the environment this program is started in. How do I do that? (Is it even possible?)</p>
  
  <p>EDIT:</p>
  
  <p>It's an environment variable that influences all .NET applications (COMplus_Version, it sets the runtime version) so setting it system wide really isn't an option.</p>
  
  <p>As a workaround I just forced NUnit to start in right .NET version (2.0) by setting it in <code>nunit.exe.config</code>, though unfortunately this also means all my .NET 1.1 unit tests are now also run in .NET 2.0. I should probably just make a copy of the executable so it can have its own configuration file...</p>
  
  <p>(I am keeping the question open (not accepting an answer) in case someone does happen to find out how (it might be useful for other purposes too after all...))</p>