我们计划迁移使用企业库 4.1 的旧应用程序,该应用程序在 .Net 4.0 Web 应用程序中使用 .Net 3.5。
我们想知道这会导致任何性能问题吗? .net 3.5 代码会在不同的环境中运行吗 应用程序池?
最佳答案
我终于找到了这个问题的答案。我之前提到的我的团队发现的性能问题是由于其他原因造成的。不在 .NET 4.0 应用程序域上加载 .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 中,这是没有问题的。
关于.Net 4.0 应用程序中的 .Net 3.5 Dll 存在任何问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6050781/