Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh environment variables for open VS solution

Using visual studio 2008, I had a solution open and realized I need to install another program that the project I was working on used. I did this with visual studio open and attempted to debug the program, however the environment variables added by the program I installed were not visible. I could not get them to refresh until I exited VS and reloaded the solution. Is there a way to get visual studio to "refresh" its environment variable list without exiting and reloading the solution?

As an additional note, I did use process explorer to look at the environment variables for the application and could confirm that it was not aware of the environment variable I needed.

like image 258
Timothy Carter Avatar asked Jul 13 '09 16:07

Timothy Carter


People also ask

How do you refresh environment variables?

2. Refresh Environment Variables via Command Prompt (CMD) Step 1: In the Start menu, search for Command Prompt and run it as an administrator. Step 2: Type the command: “set PATH = c” (without quotation marks), press the enter key, and restart the Command Prompt.

Do I need to restart for environment variables?

No, you don't need to restart your system. However, you have to restart your command prompt application to update the changes done on Environment variables.

How do I reset my Vscode environment?

To reset settings in Visual Studio code: press ctrl + shift + p.

How do you refresh an environment in R?

You can do both by restarting your R session in RStudio with the keyboard shortcut Ctrl+Shift+F10 which will totally clear your global environment of both objects and loaded packages.


2 Answers

Nope. Environment variable changes on Windows only take effect for new processes. You'll have to exit Visual Studio and restart it.

like image 100
Nick Meyer Avatar answered Oct 10 '22 16:10

Nick Meyer


I don't think there's any way round this. You have to restart the VS process so it can pick up the changes to the environment.

like image 2
Ade Miller Avatar answered Oct 10 '22 16:10

Ade Miller