system.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727'...问题解决方案
2017-12-30 12:06
1406 查看
system.IO.FileLoadException: Mixed mode assembly is built against version ‘v2.0.50727’问题解决方案
加载了大恒图像的GxIAPINET.dll 文件后,出现了如下错误提示system.IO.FileLoadException: Mixed mode assembly is built against version ‘v2.0.50727’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.
经查阅资料,得到如下解决方案:
打开项目下的App.config文件
我的打开后是如下代码:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> </startup> </configuration>
在startup后面添加一句话 useLegacyV2RuntimeActivationPolicy=”true” :
<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> </startup> </configuration>
然后保存,然后先清除再重新编译,问题解决。
相关文章推荐
- “System.IO.FileLoadException: Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 错误
- VS2008工程移植到2010的问题'system.io.fileloadexception was unhandled message=mixed mode assembly is built ag
- C#中遇到dll与.net 4.0不兼容,Mixed mode assembly is built against version 'v2.0.50727' 的解决办法
- Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additio
- Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound
- .NET Business Connector mode assembly is built against version 'v2.0.50727' of the runtime
- Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound
- Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound
- Mixed mode assembly is built against version 'v1.1.4322' of the runtime and...问题——C# DirectXSound
- Mixed mode assembly is built against version 'v2.0.50727' 解决方案
- Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additio
- Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration info
- VS2012载入DLL编译出现试图载入格式不对的程序; 以及执行出现Mixed mode assembly is built against version 'v2.0.50727' of the
- VS2012加载DLL编译出现试图加载格式不正确的程序; 以及运行出现Mixed mode assembly is built against version 'v2.0.50727' of the
- 关于VS中遇到System.IO.FileNotFoundException问题的解决办法
- Could not load file or assembly 'vjscor, Version=2.0.0.0, Culture=neutral, 问题解决方法
- System.IO.FileLoadException: 未能加载文件或程序集“Microsoft.ReportingServices.UpgradeScripts, Version=10.0.0.0
- VS2015解决问题 Could not load file or assembly 'Microsoft.VisualStudio.ConnectedServices, Version=2.0.0.
- Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Enterp
- 异常详细信息: System.IO.FileLoadException: 未能加载文件或程序集“Office, Version=7.0.3300.0,