.NET Multiple Instances for Testing

.NET Multiple Instances

For testing purposes, here is a quick way to create and run multiple instances of your program:

  1. Don't run it yet! Once the RegisterProgramInstance() method is called, it becomes a unique program instance with an assigned Program Instance ID.
  2. Build (F6) your solution.
  3. Go to the solution's \bin\Debug or \bin\Release folder.
  4. Make several copies of the contents of that folder.
  5. Each of those copies when run becomes a unique program instance.

Note: A Release build performs better than a Debug build. If you are reviewing your apps performance, select Release for the Solution Configuration.