问题
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