We have a project that references COM+ components (written in VB6). The components are added to our .Net solution by ‘Add reference’.
This works well and even intellisense works.
Now and then the interfaces (compatability) of the components are broken and our .Net code doesn’t work anymore. The component was added with a specific GUID, that GUID isn’t registered anymore.
The question:
Is it possible to call the COM+ components in the same way as we are used to (no reflection allowed), without having to update the references in our .Net solution. For instance by creating a wrapper for the COM+ component on basis of filename?
Regards,
M.
No, .NET (as well as any native program) will not be able to instantiate a COM component without knowing the right GUID.
Your best bet is to prevent that component from changing GUIDs in the first place turn on binary compatibility in the component project and maintain the interfaces to remain compatible. Once you break interfaces compatibility you’ll have to readd the component to your program so that a new valid reference is created. That’s not because .NET is dumb, that’s because once you broke the interfaces compatibility you need to recompile the client.