.NET 多版本引用
来源:互联网 发布:淘宝禁止发布违背 编辑:程序博客网 时间:2024/06/11 06:38
在C#的项目中经常要引用各种DLL,有时就要引用其他版本的DLL,此时就会产生问题。
前段时间一个同事在.NET4.0版本的project上引用SQL Server SMO,就出现了这种问题,他本地机器上安装的是SQL Server 2008,所以他引用的SMO是.NET2.0,此时就出现了版本问题。
错误信息:
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.
解决办法:
http://connect.microsoft.com/SQLServer/feedback/details/643811/net-4-0-compatible-smo
add the following entry to the app.config file and it should work.
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0"/>
</startup>
For your dev machine can you please confirm the following:
1. What is the version of .NET on that machine?
2. Does the app.config file on the dev machine has the above given entry?
经试验果然解决了版本问题。
- .NET 多版本引用
- .NET 项目中引用的DLL 版本不一致的问题
- .NET 项目中引用的DLL 版本不一致的问题
- asp.net多语言版本
- Jquery 版本引用收集
- 引用不用版本dll
- NuGet packages引用包多版本存档清理
- 一个页面中引用多个不同版本的jquery
- 多版本VisualStudio导致的.net版本问题
- ASP.NET 实现多版本語言
- Net Framework各版本(2)-vs2010添加引用页和CLR side-by-side的变化
- .net在同一个项目中要引用两种不同版本的dll(dll hell)的解决办法
- .net引用的原理
- .NET引用API
- .net 三层架构 引用
- [.net] 不明确引用
- 【引用】net命令用法
- VBA引用.Net类库
- Python – 新浪微博id转url
- 检测cpu是否支持VT
- 如何使Excel与SQL Server数据交互?
- 【Windows 核心编程】Windows 核心编程 -- 字符和字符串处理
- 图解iptables:chains and tables
- .NET 多版本引用
- Linux终端命令用法精选(分类,便于查看)
- 串口通讯
- chrome桌面提醒功能使用
- c++ 引用
- label(标签)的使用
- java23种设计模式一(连载)
- NFC:不只是移动支付
- 商业智能方案部署之SQL Server 2008R2与SharePoint 2010环境的集成