简体   繁体   中英

.net 3.5 COM loading 4.5.2 assembly

I have a C++ exe file. It created a .Net 3.5 based COM object, which needs to load a .Net 4.5.2 assembly.

I tried creating a manifest file in the COM object project to specify:

<clrClass
   name="ComAssembly.MyClass"
   clsid="{67975F17-3D44-38C1-BC2C-B58E50A481F6}"
   runtimeVersion="v4.0.30319.34000"
   threadingModel="Both"
 />

but I'm still getting error 8013101b (assembly is built by a new runtime ...)

How to do it correctly?

I ended up changing the value of the registry RuntimeVersion value for the COM class InprocServer32 and InprocServer32\\1.0.0.0. It works fine with v4.0.30319.34000

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM