加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

.Net 3.5 Dll在.Net 4.0应用程序中的任何问题

发布时间:2020-12-14 01:59:02 所属栏目:Windows 来源:网络整理
导读:我们计划移动使用企业库4.1的遗留应用程序,该应用程序在.Net 4.0 Web应用程序中使用.Net 3.5. 我们想知道这会导致任何性能问题吗? .net 3.5代码是否会以不同的方式运行 ?应用程序池? 解决方法 我终于找到了答案.我之前提到的团队发现的性能问题是由于其他
我们计划移动使用企业库4.1的遗留应用程序,该应用程序在.Net 4.0 Web应用程序中使用.Net 3.5.

我们想知道这会导致任何性能问题吗? .net 3.5代码是否会以不同的方式运行
?应用程序池?

解决方法

我终于找到了答案.我之前提到的团队发现的性能问题是由于其他原因造成的.不在.NET 4.0 App Domain上加载.NET 3.5.

阅读这篇文章:
http://msdn.microsoft.com/en-us/magazine/ee819091.aspx

In-Proc SxS does not solve the
compatibility problems faced by
library developers. Any libraries
directly loaded by an
application–either via a direct
reference or an Assembly.Load–will
continue to load directly into the
runtime and AppDomain of the
application loading it. This means
that if an application is recompiled
to run against the .NET Framework 4
runtime and still has dependent
assemblies built against .NET 2.0,
those dependents will load on the .NET
4 runtime as well. Therefore,we still
recommend testing your libraries
against all version[s] of the
framework you wish to support. This is
one of the reasons we have continued
to maintain our high level of backward
compatibility.

因此,将.NET 3.5程序集直接加载到.NET 4.0应用程序中而不将它们重新编译到.NET 4.0中是没有问题的.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读