c# - Set Visual Studio's environment variables for debugging a project -
i'm creating extension visual studio , 1 of requested feature is able change environment variable 1 of several options, inherited application being developed once debugged.
i have tried following
environment.setenvironmentvariable("foo", "bar", environmentvariabletarget.process); environment.setenvironmentvariable("foo", "bar", environmentvariabletarget.machine); but while persists variable, not seem pass on program once hit run.
i'm looking other ways of doing try, , don't mind if they're hacky.
edit: clarification, process should transparent (arbitrary) program being debugged. must programmatic solution
i have guess why program debugging doesn't environment variables. process reads environment variables @ process startup. , if developing .net application visual studio create *.vshost.exe process in order speed debugging startup. visual studio not create start new process when start debugging - result environment variables not read.
in stead use memory mapped file required ipc.
Comments
Post a Comment