Is it possible to force an interop assembly to reference a local copy of its associated COM DLL?
Here's the scenario:
I have a .NET app that references an interop assembly (Interop.OTAClient.dll), which is the interop for a COM DLL (OTAClient.dll, which is the automation API for HP Quality Center). I'm not very knowledgable on COM, but as I understand it the interop assembly looks up the COM classes via GUID references in the registry, rather than pointing to a specific file.
The issue I have is that the copy of OTAClient.dll that the registry keys point to gets overwritten by different versions depending on which version of QC I've just logged into in a browser, and the different versions of these DLLs are not compatible with each other. The .NET app will only be connecting to a specific version of QC, so I cannot have the COM DLL varying in this way.
Any suggestions would be greatly appreciated, as this behaviour is really irritating. I've seen other questions on COM interop issues, but they all seem to be about forcing a local version of the interop DLL to be used instead of one in the GAC, rather than this particular scenario involving the actual COM DLL.