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

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -