I would like to use a specific version of ActiveX component that is not registered system- or user-wide. Everything works as expected if I use manifest files. However embedded manifest works only for C++ client code only.
Here is 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 it just wants DLL no matter what. The problem is that DLL I get from AxImp does not have an embedded manifest. Is there a nice way to use embedded manifest? I feel like I can try for mt to embed one into DLL I get from AxImp but that seems hackish.
P.S. I'm not sure whether renaming ocx into dll is a good approach as AxImp also generates same name DLL for COM stuff and it looks like there is no flags to explicitly provide output name for COM CLR proxy.