Can I use manifests to specify an optional dependency on a COM server?

Posted by sharptooth on Stack Overflow See other posts from Stack Overflow or by sharptooth
Published on 2010-05-24T13:47:27Z Indexed on 2010/05/24 13:51 UTC
Read the original article Hit count: 250

I'd like to use manifests to specify a dependency on a COM server (reg-free COM).

The consumer application will mostly work fine without the COM server - only something like 1,7% of its functionality uses the COM server. So with plain old regsvr32 it would start and work fine until the user would do something that would trigger CoCreateInstance() call and at that point the consumer would get an error message.

Now I've played with manifests for a while and it looks like the consumer wouldn't even start unless the COM server assembly it depends on is present in the file system. That's no good.

Is there a way to use reg-free COM with manifests and make the dependency optional - so that the consumer program starts and works fine until CoCreateInstance() is actually called?

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about visual-studio-2008