We're developing a ClickOnce application with a mixture of .NET components and legacy C++ COM components.
Currently we're adding the C++ COM components to the user's machine using an MSI (this is a prerequisite to installing our ClickOnce app) which means we can register the COM objects on the user's machine beforehand.
We can still push out updates to the rest of the application written in C# via ClickOnce, but updating the components installed by the MSI requires manual intervention.
However, we are trying to figure out if it is possible to install the C++ COM components via registration free COM, i.e. they're all in the same directory, and each component has a manifest file specifying the clsid for each COM object and interface. This would mean we can get rid of the MSI entirely.
This link has been a good introduction to the topic.
I've been able to get a .NET component to load a C++ COM object, but not the other way around.
Does anyone know if this is possible?
Yes, that's possible. You'll need to use the <clrClass>
element in the manifest. There's a decent how-to located here. The SDK docs are otherwise pretty miserable, you'll need Junfeng Zhang's blog to get better background info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With