On a class library project, I set the "Start Action" on the Debug tab of the project properties to "Start external program" (NUnit 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?)
EDIT:
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.
As a workaround I just forced NUnit to start in right .NET version (2.0) by setting it in nunit.exe.config
, 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...
(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...))