简体   繁体   English

将 Web 窗体 ASP.Net 3.5 升级到 4.7

[英]Upgrading Web Forms ASP.Net 3.5 to 4.7

We have a web forms project that is running on ASP.Net 3.5 and we need to upgrade all the way to 4.7.我们有一个在 ASP.Net 3.5 上运行的 Web 表单项目,我们需要一直升级到 4.7。 Telerik controls are involved which I know will need to be upgraded as well.涉及到 Telerik 控件,我知道它也需要升级。 This is a large web application and I know there is not quick solution, but trying to figure out how to get started.这是一个大型 Web 应用程序,我知道没有快速解决方案,但我正在尝试弄清楚如何开始。 Does anyone have any recommendations for such a task.有没有人对这样的任务有任何建议。

It depends on the CLR for the .Net framework you are using.这取决于您使用的 .Net 框架的 CLR。 .Net Framework 2.0, 3.0, and 3.5 uses CLR 2.0 .Net Framework 4, 4.5, and 4.5.1 uses CLR 4.0 CLR 3.0 does not exist An application developed in .Net 2.0 or 3.0 can run in a 3.5 framework because the target CLR is the same .Net Framework 2.0、3.0 和 3.5 使用 CLR 2.0 .Net Framework 4、4.5 和 4.5.1 使用 CLR 4.0 CLR 3.0 不存在在 .Net 2.0 或 3.0 中开发的应用程序可以在 3.5 框架中运行,因为目标 CLR是一样的

But an application developed in .Net 3.0 will not run in a 4.5 framework because now the target framework is different (CLR 4)但是在 .Net 3.0 中开发的应用程序不会在 4.5 框架中运行,因为现在目标框架不同(CLR 4)

Solution解决方案

To configure your application to run on .Net Framework 4 or 4.5:将应用程序配置为在 .Net Framework 4 或 4.5 上运行:

Create a text file that has the same name as your application, and add the file extension .config.创建一个与您的应用程序同名的文本文件,并添加文件扩展名 .config。 For example, if your application is named abc.exe then your application configuration file must be named abc.exe.config.例如,如果您的应用程序名为 abc.exe,那么您的应用程序配置文件必须命名为 abc.exe.config。 Add the element as follows to the application configuration file:将如下元素添加到应用程序配置文件中:

`<configuration>
  <startup>
    <supportedRuntime version="version"/>
  </startup>
</configuration>`

Check framework upgrade guidelines here: https://social.msdn.microsoft.com/Forums/vstudio/en-US/d4c6adee-4dd5-435d-a021-4fd9d4c6f7c0/net-framework-upgrade-from-35-to-471?forum=netfxsetup在此处查看框架升级指南: https : //social.msdn.microsoft.com/Forums/vstudio/en-US/d4c6adee-4dd5-435d-a021-4fd9d4c6f7c0/net-framework-upgrade-from-35-to-471?论坛=netfxsetup

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

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