.NET Framework的更高版本是否适用于针对早期版本的应用程序? [重复]

时间:2022-10-25 00:11:50

This question already has an answer here:

这个问题在这里已有答案:

If a .NET app is compiled targetting .NET 2.0, will an installation of Windows with only .NET 4.0 installed allow the app to execute without any problems?

如果.NET应用程序是针对.NET 2.0编译的,安装只有.NET 4.0的Windows安装是否允许应用程序执行而没有任何问题?

2 个解决方案

#1


2  

They are supposed to be backwards compatible, but there are certain edge-cases that can cause problems. Unless you're pushing the limits of the framework, you should be okay.

它们应该是向后兼容的,但是某些边缘情况可能会导致问题。除非你在推动框架的限制,否则你应该没问题。

#2


1  

I wouldn't simply ask the question here I would actually test it if the application actually means anything to anyone. This is a very simple thing to test and given that you're providing no info on the app in question any answer is going to be something like "probably, but it depends".

我不会简单地问这里的问题,如果应用程序实际上对任何人都有意义,我会实际测试它。这是一个非常简单的测试方法,并且鉴于您没有提供有关该应用程序的任何信息,任何答案都将是“可能,但它取决于”。

Update:

更新:

Are you forcing use of the (non existent) 2.0 runtime via the configuration file?

您是否通过配置文件强制使用(不存在的)2.0运行时?

<configuration>
   <startup>
      <supportedRuntime version="v2.0.50727"/>
   </startup>
</configuration>

#1


2  

They are supposed to be backwards compatible, but there are certain edge-cases that can cause problems. Unless you're pushing the limits of the framework, you should be okay.

它们应该是向后兼容的,但是某些边缘情况可能会导致问题。除非你在推动框架的限制,否则你应该没问题。

#2


1  

I wouldn't simply ask the question here I would actually test it if the application actually means anything to anyone. This is a very simple thing to test and given that you're providing no info on the app in question any answer is going to be something like "probably, but it depends".

我不会简单地问这里的问题,如果应用程序实际上对任何人都有意义,我会实际测试它。这是一个非常简单的测试方法,并且鉴于您没有提供有关该应用程序的任何信息,任何答案都将是“可能,但它取决于”。

Update:

更新:

Are you forcing use of the (non existent) 2.0 runtime via the configuration file?

您是否通过配置文件强制使用(不存在的)2.0运行时?

<configuration>
   <startup>
      <supportedRuntime version="v2.0.50727"/>
   </startup>
</configuration>