9 hours of struggling COM+ wrappers, 1 lesson.
The story goes like this. There is an organization that decides to use MQSERIES as their message infrastructure. They create COM proxy registered in COM+ for DNA objects and maintain that COM proxy for .NET until the coming version of .NET MQSeries library. They use TlbImp to create wrapper assembly and distribute that assembly among .Net users in the organization. Now, as the time pass the made some bug fix and improvement to their proxy assembly and then BOOM. Nothing seems to work they didn’t change their COM proxy Interfaces nor version number but all the existing .Net assemblies on integration server refuse to load the proxy wrapper. On developers machines every thing works like charm, after deploying the new proxy. but on the server ….
To make long story short it was all about the wrapper assembly that the Tlbimp created for Comsvsc.dll. When you use TlbImp on COM DLL that registers on COM+, TlbImp create wrapper .Net assembly for Comsvcs.dll. if you don’t save the wrapper assembly for Comsvcs.dll and place that DLL in the directory where TlbImp works, TlbImp will create new wrapper assembly for comsvcs.dll. Now your new wrapper assembly got reference to new comsvcs.dll wrapper that don’t exist on the server nor referenced from other .Net assemblies.
In one sentence: Keep the comsvcs wrapper assembly of wrapper COM DLLls for future use.