I would like to use a specific version of the ActiveX component that is not registered on the system or around the world. Everything works as expected if I use manifest files. However, the inline manifest only works for C ++ client code.
Here is the dependency declaration
<dependency> <dependentAssembly> <assemblyIdentity type="win32" name="MapWinGIS.ocx" version="4.9.1.0" /> </dependentAssembly> </dependency>
If I use SxStrace, I see the following
INFO: Parsing Manifest File C:\OSGeo4W\bin\TestApplication.exe. INFO: Manifest Definition Identity is MyApplication.app,version="1.0.0.0". INFO: Reference: MapWinGIS.ocx,type="win32",version="4.9.1.0" INFO: Resolving reference MapWinGIS.ocx,type="win32",version="4.9.1.0". INFO: Resolving reference for ProcessorArchitecture MapWinGIS.ocx,type="win32",version="4.9.1.0". INFO: Resolving reference for culture Neutral. INFO: Applying Binding Policy. INFO: No binding policy redirect found. INFO: Begin assembly probing. INFO: Did not find the assembly in WinSxS. INFO: Attempt to probe manifest at C:\OSGeo4W\bin\MapWinGIS.ocx.DLL. INFO: Attempt to probe manifest at C:\OSGeo4W\bin\MapWinGIS.ocx.MANIFEST. INFO: Attempt to probe manifest at C:\OSGeo4W\bin\MapWinGIS.ocx\MapWinGIS.ocx.DLL. INFO: Attempt to probe manifest at C:\OSGeo4W\bin\MapWinGIS.ocx\MapWinGIS.ocx.MANIFEST. INFO: Did not find manifest for culture Neutral. INFO: End assembly probing. ERROR: Cannot resolve reference MapWinGIS.ocx,type="win32",version="4.9.1.0". ERROR: Activation Context generation failed.
So, apparently, he just wants a DLL, no matter what. The problem is that the DLL obtained from AxImp does not have a built-in manifest. Is there a good way to use the inline manifest? I feel like I can try to have mt embed it in the DLL I get from AxImp, but it seems hacky.
PS I'm not sure if renaming ocx to dll is a good approach, since AxImp also generates the same DLL names for COM content, and it seems that the flags do not explicitly provide the output name for the COM CLR proxy.
clr interop com com-interop
mlt
source share