c# - Visual Studio cannot recognize a change in environment variable -


i using environment variable in program , setting variable value outside visual studio. when try below line of code, returns variable value if value set before opening current instance of vs. changes done later not have effect.

var variablevalue = environment.getenvironmentvariable("env_var"); 

to receive new value set, way out restart vs. looks vs caches these values on startup , doesn't consider new changes. however, question whether there way refresh current vs session such can read changed environment variable value & therefore need not go on restart again?

it possible per-machine environment variable. changes reflected in running process.

environment.getenvironmentvariable("env_var", environmentvariabletarget.machine) 

if feasible use machine-wide variable depends on scenario, however.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -

php - Mongodb connectivity error -