I'm facing a the following situation: I created a simple full trust XBAP application that refers to unmanaged c++ COM server (isolated).
After deployment I expect that XBAP application will d开发者_开发百科iscover the COM server dll that is placed in the same directory, but it is not. I'm getting the following error:
Exception has been thrown by the target of an invocation. ---> System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {970599E0-2673-11D3-A8A8-00105AA943DF} failed due to the following error: 80040154. at Generation888.Generation888.Simple(Int32 num1, Int32 num2)
I verified that the folder where the XBAP was deployed contains the DLL and XBAP manifest that contains proper CLSID
If I created a simple C# Windows Form application and refers to the same COM dll, it works fine.
My question is does XBAP support Side-by-Side mechanism.
Thanks
I'm not terribly familiar with XBAPs so these are some general suggestions. If your XBAP is in fact being launched as a separate executable since it's fulltrust (what does taskmgr say?), try using the "sxstrace.exe" tool from an elevated command line on Windows Vista or later to determine whether the XBAP manifest is actually being interpreted by the system. It's possible that if you first tried your application without a manifest or changed the manifest, the system cached this old information and you'll need to clear this manifest-state cache by touching the timestamp of both the manifest and the executable.
It's also possible that your executable has an embedded manifest, which would mean that the external manifest is being ignored. To check this open the executable up in Visual Studio and see if it has an RT_MANIFEST resource of ID 1.
精彩评论