Reputation: 492
So I have a very large project with multiple applications. One in particular, say APP1, is not allowed to start if another one in particular is already running, say APP2.
The cleanest way of doing this is checking for existence of a process starting with the assembly name of APP2, because when it's being debugged it appears as APP2.vshost.exe but when in production it will be APP2.exe.
My problem arises when the default startup project is set to APP2, the process exists in the process list continuously, except if that application is started and closed before the debug session ends, in that one scenario it doesn't appear in the process list but pops back in again when the debug session ends.
Is there any way around this apart from ignoring this check when in debug session and only checking for the existing of APP2.exe and ignoring the .vshost instance?
Upvotes: 0
Views: 50
Reputation: 492
The solution was to disable Visual Studio Hosting Process for the project I don't want to persist in the process list when not running. There are pros and cons to the hosting process and for the cons in my case it was worth it.
Upvotes: 1