Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VS 2010 VSIP: How do I programmatically override env vars in Visual Studio 2010?

$
0
0

Hi,

I have created a vspackage for VS 2005 and 2008, and am continuing my efforts to port this to VS 2010, but I notice one thing that no longer works.

In VS 2005/2008 I was able to override Visual Studio's current set of env vars while it was running by using the following code:

//Update the env var:

Environment.SetEnvironmentVariable("MY_ENV_VAR", newValue, EnvironmentVariableTarget.Process);
 

Is there a better way to do this that will work with VS 2005, 2008, and 2010?

If not, is there a way that will at least work with VS 2010?

 

Thanks,

Jason


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>