简体   繁体   English

框架升级到3.5

[英]Framework Upgrade to 3.5

I have a project which references another project's dll. 我有一个引用另一个项目的dll的项目。 They both were in .net framework 2.0. 它们都在.net framework 2.0中。

So upgraded both to 3.5, but when I go to reference for second project(the one referencing the first project) it still says on properties runtime version 2.0, even though I deleted the reference and readded. 因此将两者都升级到3.5,但是当我转到第二个项目的引用(一个引用第一个项目的引用)时,即使我删除了该引用并进行了读取,它仍然在属性运行时版本2.0中说。

  1. How would I determine if the referenced dll is the upgraded one, before deploying to server where it has version 2.0? 在部署到具有版本2.0的服务器之前,如何确定引用的dll是否为升级的dll?

  2. I don't want to delete all files in server and deploy, after upgrading do I need to check the config files are referencing same dlls and deploy published files or it needs replacing all together? 我不想删除服务器中的所有文件并进行部署,升级后是否需要检查配置文件是否引用了相同的dll并部署了已发布的文件,还是需要一起替换所有文件?

.Net 3.5 and .Net 2 both run on version 2 of the CLR, so the runtime version of the 'old' and 'upgraded' assemblies will not change. .Net 3.5和.Net 2都在CLR的版本2上运行,因此“旧”和“升级”程序集的运行时版本不会更改。

As for finding out whether it is 'upgraded', I would recommend using ILDASM to see which version of mscorlib is referenced. 至于确定它是否“升级”,我建议使用ILDASM查看所引用的mscorlib版本。

However, the answers to this SO question provide a few alternatives. 但是, 此SO问题的答案提供了一些替代方案。

通过在Reflector(或另一个反编译器)中打开程序集,您可以轻松地检查生成程序集所针对的版本。

The CLR for .NET 3.0 and .NET 3.5 is the same CLR from .NET 2.0. .NET 3.0和.NET 3.5的CLR与.NET 2.0中的CLR是相同的。

Hence the best way to check, if your assemblies are upgraded or not, is to use Assembly version. 因此,检查程序集是否已升级的最佳方法是使用程序集版本。 Do maintain assembly version and build version in AssemblyInfo.cs while building the assembly. 生成程序集时,请在AssemblyInfo.cs中维护程序集版本和生成版本。

Having a strong named assembly is the best way to check. 拥有强大的命名程序集是检查的最佳方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM