问题
Is it possible to set the app.config useLegacyV2RuntimeActivationPolicy parameter during runtime (basically before one of the 'affected' assemblies is being loaded?).
回答1:
This can be done via the CLR Hosting APIs. I detail the technique here.
来源:https://stackoverflow.com/questions/3750253/set-net-4-uselegacyv2runtimeactivationpolicy-during-runtime