I've got a .NET application which uses a COM server. The COM server is registered on the machine where I run it, so when my code reaches new MyInterop.SomeObject()
the appropriate MyComServer.exe
is started.
However, as I'm debugging, I've got several copies of MyComServer.exe
residing in different folders with different configuration files. I would like to specify which my app should load.
Two workarounds that I know of are:
- I can re-register it every time (
MyComServer.exe /regserver
) before use. But I don't like to use a global solution for a local problem. - I start
MyComServer.exe
manually (it then runs as a standalone app) and the COM infrastructure will reuse this existing process. But that's not very automatable.
Is there anything more appropriate?