useLegacyV2RuntimeActivationPolicy=“true” does not work with .NET 4.5

可紊 提交于 2019-12-10 15:41:31

问题


The Top answers here: What does 'useLegacyV2RuntimeActivationPolicy' do in the .NET 4 config? and What 'additional configuration' is necessary to reference a .NET 2.0 mixed mode assembly in a .NET 4.0 project? did not help.

My particular Use-case is .Net 4.5 and above for WinForms and Console apps in VS2015, while trying to use a .net 2.0 dll

Under VS2015, adding the suggested variants of this to projects config file does not help.

<configuration>
  <startup useLegacyV2RuntimeActivationPolicy="true">
    <supportedRuntime version="v4.0"/>
  </startup>
</configuration>

EDIT:

The .net 2.0 library depends on an external, non-dotnet dll.

In .net 4.0 client mode and .net 4.0 Full mode it works as expected.

But for .net 4.5 and above the functionality in that library stops working, even though the application starts up.

来源:https://stackoverflow.com/questions/36484717/uselegacyv2runtimeactivationpolicy-true-does-not-work-with-net-4-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!