.NET框架版本之间有什么区别 [英] What are the differences between .NET framework versions

查看:168
本文介绍了.NET框架版本之间有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 C#中创建了程序[ ^ ], IDE SharpDevelop [ ^ ]并使用编译器选项进行编译:



目标框架设置为.Net framework ver 2.0。并且

目标CPU设置为任何处理器



它在安装了.net 2.0的计算机上运行完美,无论处理器类型如何。 />


但是,当我尝试在安装了.net 4.0的计算机上启动程序时,它不起作用。

有关于错误.net的消息当我尝试启动程序时的框架。



可能是什么问题?



出于某种原因,我总是认为较新版本的.net框架支持为旧版本编写的程序。



我尝试过:



只有一个可能的东西,重新分发.net 2.0 zip库,带有exe版本的程序,以便用户可以在必要时将它安装在他们的计算机上。



这个解决方案不合适,因为它会增加程序下载的成本,

表示为下载所需的数据量。

I have created program in C# [^] , IDE SharpDevelop [^] and compile it with compiler options :

target framework set to .Net framework ver 2.0. and
target CPU set to any processor

It runs perfectly on computers that have .net 2.0 installed, regardless type of processor.

But, when I try to start program on computer with .net 4.0 installed, it do not work.
There is message about wrong .net framework when I try to start program.

What could be the problem ?

For some reason I allways tought that newer versions of .net framework supports programs written for older ones.

What I have tried:

Only one possible thing, redistribute .net 2.0 zip library, with exe version of program so that users can install it on their computers if necessary.

This solution is inadequate because it raises cost of program download,
expressed as the amount of data that is necessary to download.

推荐答案

使用.net构建的 EXE 有一个特殊的加载程序,用于检查安装的.net版本与它构建的版本。如果它们不匹配将发出消息。



注意
:.net版本破坏CLR变化分别为1.0,1.1,2,4(即3和3.5在2上运行添加)



注意
:您可以构建.net 2 dll并在4个内置的EXE上运行它们.net 4 CLR已安装。
EXE's built with .net have a special loader which checks the version of .net installed with the one it was built on and will give a message if they don't match.

Note
: .net version breaking CLR changes were 1.0, 1.1, 2, 4 (i.e. 3 and 3.5 run on 2 with additions)

Note
: you can build .net 2 dll's and run them on 4 built EXE's with only .net 4 CLR installed.


最后我在此链接中找到了差异列表:



.NET Framework版本历史 - 维基百科,免费的百科全书 [ ^ ]
Finally I have found list of differences at this link :

.NET Framework version history - Wikipedia, the free encyclopedia[^]


这篇关于.NET框架版本之间有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆