Assembly identity in activation context does not match the information in the manifests RRS feed

  • Question

  • Scenario:

    There is a managed application that instantiates an unmanaged COM object which in turn instantiates another managed COM object in a .NET assembly. All of the there objects reside in separate dlls, and each of these dlls have a manifest (the unmanaged dlls have an external manifest, while the assembly has an embedded manifest).

    When the application is updated (all three dlls are provided in a newer version), sxstrace shows that the manifests are reloaded with the correct (new) version numbers. However, the fusion logs tell us that the managed com object dll is looked for in the previous version. Additionally, when querying the activation context (via QueryActCtxW()) where the managed com object shall be instanciated, we see that it also points to the previous version, obviously letting fail the CoCreateInstance() with a return code of 0x80131040 (FUSION_E_DEF_MISMATCH).

    Only a restart of the complete system allows us to load the assembly correctly. It is unclear to us why the sxs subsystem and the fusion loader seem to have a different view on the version numbers and how to resolve this issue without a reboot.
    Thursday, February 23, 2012 10:33 AM


  • After deploying the new version, you need to register the new COM library and remove reference to old COM from you application, and add new version to your project and rebuild it.

    Hard hard work, Day day up!

    • Marked as answer by Lie You Friday, March 9, 2012 8:16 AM
    Tuesday, February 28, 2012 3:17 AM