简体   繁体   English

.NET Framework版本

[英].NET Framework versions

I've had a little search and I was wondering if there is back compatibility for the .NET framework. 我有一点搜索,我想知道是否有.NET框架的后兼容性。

The real question is, if there's a program that uses .NET Framework 1.1, can I install 3.5 and be done, or do I have to install 1.1 and then if something uses 3.5 I have to install 3.5 as well? 真正的问题是,如果有一个使用.NET Framework 1.1的程序,我可以安装3.5并完成,或者我必须安装1.1然后如果某些东西使用3.5我也必须安装3.5吗?

Unfortunately you will have to install both versions. 不幸的是,你必须安装这两个版本。 Older version of the framework are not automatically bundled with newer versions. 较旧版本的框架不会自动与较新版本捆绑在一起。

I believe if you install the 3.5 framework, you get everything backwards to the 2.0 framework. 我相信如果你安装了3.5框架,那么你可以将所有内容都转回到2.0框架。 The 3.5 (and 3.0) framework runs on the 2.0 CLR, so you're really getting the 2.0 runtime with the extra goodness of 3.0 and 2.5 on top of it. 3.5(和3.0)框架在2.0 CLR上运行,所以你真正获得了2.0运行时的额外优点3.0和2.5。

You'd have to separately install the 1.1 framework. 您必须单独安装1.1框架。

You can see the installed versions here: C:\\Windows\\Microsoft.NET\\Framework 您可以在此处查看已安装的版本:C:\\ Windows \\ Microsoft.NET \\ Framework

If you install something that requires 3.5, then you will have to install it. 如果您安装需要3.5的东西,那么您将不得不安装它。 The way that .Net works though, you can have 1.1, 2.x and 3.5 all installed at the same time. 虽然.Net的工作方式,你可以同时安装1.1,2.x和3.5。 Programs specify the version of the framework they need, and that version is loaded for them. 程序指定所需框架的版本,并为其加载该版本。

Especially with .NET 2.0 many things have changed in the .NET framework (not only at the language level). 特别是对于.NET 2.0,.NET框架中的许多东西都发生了变化(不仅仅是在语言层面)。 You will need version 1.1 to run programs linked against that version. 您将需要1.1版来运行与该版本链接的程序。

Now, if parts of your program use .NET 3.5, and you have access to all the source, I would recommend you port the entire application to .NET 3.5 and be done with it. 现在,如果程序的某些部分使用.NET 3.5,并且您可以访问所有源代码,我建议您将整个应用程序移植到.NET 3.5并完成它。 It make take you a little longer, but it will be worth it moving forward. 这会让你花费更长的时间,但值得前进。

Many, perhaps most, applications built for .NET 1.1 will run on later versions of the framework. 为.NET 1.1构建的许多(可能是大多数)应用程序将在更高版本的框架上运行。

But there were some breaking changes, so the only way to be sure if your app build for .NET 1.1 will run on .NET 2.0 or later is to test it. 但是有一些重大变化,所以唯一的方法是确保你的.NET 1.1版本的应用程序是在.NET 2.0或更高版本上运行的,那就是测试它。

Microsoft documented the known breaking changes between .NET 1.1 and .NET 2.0 (see http://blogs.msdn.com/brada/archive/2005/11/14/492561.aspx ) - but the links to this content seem to be broken :( Microsoft记录了.NET 1.1和.NET 2.0之间已知的重大变化(请参阅http://blogs.msdn.com/brada/archive/2005/11/14/492561.aspx ) - 但此内容的链接似乎是破碎的:(

And I know of at least one undocumented breaking change due to a bug. 而且我知道至少有一个由于bug而导致的无证破坏性更改。

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

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