Can I start appname.vshost.exe
from debug folder under different username than the one used to start VisualStudio?
There is appname.vshost.exe.config
with the following content. Is there a config for username? I have tried searching for it but couldn't find anything.
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>
I don't think you can start vshost.exe under different user than the one you have used to start Visual Studio. So now I am starting main console app under different user from another console app and attaching debugger to it and it works.
I have copied my code below if it helps anyone.