I have an executable built in Visual Studio which normally runs (i.e. in our production environment) as a single-instance application. I accomplished this by using the "Make single instance application" check box in the "Windows application framework properties" area on the "Application" tab of the project's properties, as shown here:
My application is a workflow application, so it involves passing workflow items from one user to another; all involved users have this application running on their own computers.
In my development environment, however, it's often the case that I want to impersonate a few different users at the same time (this ability to impersonate users is a feature that the users themselves are not aware of) in order to troubleshoot a complex bug in the application. It's easier to have multiple instances open simultaneously, each impersonating a different user, and in some cases, it's necessary because the bug might be something that only occurs once the initial overhead of starting the application has been undertaken -- in other words, closing the application to switch user contexts releases state which will preclude the bug.
I'm able to accomplish this easily enough by un-checking the above-mentioned check box; however, I then have to remember to re-check it at some point before I deploy the bug fix. It would be better if I could set something external to the application that lives only on my development computer, e.g. a registry value, which triggers the application to behave as a multiple-instance application. I have searched high and low, and it appears that no one has asked this question before.
Has anyone here ever encountered this? Your help would be much appreciated.