2014-01-17 20 views
1

我收到這個異常..可能是什麼原因?無法在4.0運行時加載沒有額外的配置信息

- 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: 

回答

4

爲了從2.0加載混合模式的組裝或之前到4.0,你需要將以下條目添加到您的app.config文件

<startup useLegacyV2RuntimeActivationPolicy="true" /> 

Documentation

+0

好了,我看到了這個話題..但你可以解釋是什麼原因導致下面的情況,因爲應用程序運行相當不錯..他們似乎是在4.0框架開發..我沒有看到任何2.0的東西..關心定義「混合模式彙編「 – user4127

+0

@ user4127一個混合模式sembly是用C++/CLI編譯的。 CLR棄用了C++/CLI代碼可能用於將CLR引入給定進程的功能,並將其替換爲允許並行託管的功能。這個標誌實際上禁用並排hostnig的應用程序仍然使用舊的apis – JaredPar

+0

仍然無法正常工作..我是否缺少任何額外的參數? – user4127

相關問題