如果没有其他配置信息,则无法在4.0运行时加载

时间:2014-01-17 01:47:55

标签: .net

我得到了这个例外......可能是什么原因?

- 1/XX/2014 9:56:00 AM: 11253-Error creating configuration. 
Could not load configuration, Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. 
Mixed mode assembly is built against version 'v1.1.4322' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information. 

Application: xxxxxxxxx_xxxx.exe 
Framework Version: v4.0.30319 
Description: The process was terminated due to an unhandled exception. 
Exception Info: System.NullReferenceException 
Stack: 

1 个答案:

答案 0 :(得分:4)

为了将混合模式程序集从2.0或之前加载到4.0,您需要将以下条目添加到app.config文件中

<startup useLegacyV2RuntimeActivationPolicy="true" /> 

Documentation