Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to upgrade an ASP.NET MVC2 project to MVC 3 RC

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to upgrade the ASP.NET MVC2 project to MVC 3 RC". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn how to upgrade the ASP.NET MVC2 project to MVC 3 RC.

To manually upgrade an existing ASP.NET MVC2 project to ASP.NET MVC3 (RC), we need the following steps:

1. Casually create a new ASP.NET MVC3 project, and we will use some of the files included in the upgrade.

two。 Copy the following files from the new project to the existing ASP.NET MVC2 project, which are:

/ Scripts/jquery.unobtrusive-ajax.js

/ Scripts/jquery.unobtrusive-ajax.min.js

/ Scripts/jquery.validate.unobtrusive.js

/ Scripts/jquery.validate.unobtrusive.min.js

/ Views/Web.config

3. If your existing ASP.NET MVC2 project contains several area, you need to copy the / Views/Web.config file to all area to replace the original file.

4 search and replace the following in the Web.config file of the project (three in the Web.config in the root directory and four in the Web.config file in the Views folder):

System.Web.Mvc, Version=2.0.0.0 → System.Web.Mvc, Version=3.0.0.0

5. Remove the reference to System.Web.Mvc in the solution browser (because you are referring to the large DLL in ASP.NET MVC2) and add a reference to System.Web.Mvc (v3.0.0.0). Next, reference System.WebPages.dll and System.Web.Helpers.dll, respectively.

6. Right-click the project name in the solution browser and select Uninstall the project. Then right-click the project name again and select Edit ProjectName.csproj.

7. Find the ProjectTypeGuids node in ProjectName.csproj and replace {F85E285D-A4E0-4152-9332-AB1D724D3325} with {E53F8FEA-EAE0-44A6-8774-FFD645390401}.

8. Right-click the project after saving the changes in step 7 and reload it.

9. Add the following two items to the assemblies node in Web.config under the application root directory

10. If your project references other third-party class libraries that are co-compiled using dll in ASP.NET MVC2, you need to make the following changes

It's done. Enjoy the charm of ASP.NET MVC.

Add: if the TagBuilder class is used in the project, refer to System.Web.WebPages.dll.

Thank you for reading, the above is the content of "how to upgrade the ASP.NET MVC2 project to MVC 3 RC". After the study of this article, I believe you have a deeper understanding of how to upgrade the ASP.NET MVC2 project to MVC 3 RC, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report