Assemblies not loading in office add-in with .net 4

0

When I upgrade my add-in project from .net 3.5 to 4.0 I get this error in FusLog when it wants to load my add-in assembly:

Error extracting manifest import from file (hr = 0x8013101b).

I also add this to office exe config file (visio.exe.config in my case) but nothing changed.

<configuration>
    <startup>
        <supportedRuntime version="v4.0"/>
    </startup>
</configuration>
.net
vsto
office-interop
shim
fuslogvw
asked on Stack Overflow Dec 10, 2014 by DaNeSh • edited Dec 10, 2014 by Uwe Keim

2 Answers

0

Are you able to reproduce the issue with a newly created add-in if the target framework is set to .net 4.0?

It looks like one of your dependencies cannot be loaded (i.e. the .net 4.0 runtime is not supported).

P.S. When we talk about .net 4.0 - the full edition of the .net framework is considered (not the Client Profile).

answered on Stack Overflow Dec 10, 2014 by Eugene Astafiev
0

Finally I find the answer: I should add useLegacyV2RuntimeActivationPolicy="true" as a startup attribute of the config file. so I should set the visio.exe.config to :

 <configuration>
 <startup useLegacyV2RuntimeActivationPolicy="true">
   <supportedRuntime version="4.0" sku=".NETFramework,Version=v4.0" />
 </startup>
 </configuration>
answered on Stack Overflow Dec 10, 2014 by DaNeSh

User contributions licensed under CC BY-SA 3.0