简体   繁体   English

将MVC1项目升级到MVC5

[英]Upgrade MVC1 project to MVC5

Is there a way to convert a ASP.Net MVC 1 project build in VS2008 to ASP.Net MVC 5 and VS2015? 有没有一种方法可以将VS2008中的ASP.Net MVC 1项目构建转换为ASP.Net MVC 5和VS2015?

I tried to just open it in VS 2015 but that gave the error "This project is incompatible with the current version of Visual Studio". 我试图在VS 2015中将其打开,但出现错误“此项目与Visual Studio的当前版本不兼容”。

There are ways to reference newer versions and update, eg: 有一些引用较新版本和更新的方法,例如:

http://www.asp.net/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2 http://www.asp.net/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web- api-2

.. however updating from MVC1 (especially if you cannot open the project) you probably don't want to manually install ASP.NET MVC installs etc (if that what I remember) ..但是从MVC1更新(特别是如果您无法打开项目),您可能不想手动安装ASP.NET MVC安装等(如果我记得的话)

I would suggest creating a new MVC5 application, referencing MVC via Nuget etc and pulling in code as required. 我建议创建一个新的MVC5应用程序,通过Nuget等引用MVC并根据需要提取代码。 This will give you a chance to re-structure things and learn newer ways otherwise you my be fighting with MVC configuration and references. 这将使您有机会重新组织事物并学习更新的方法,否则您将无法使用MVC配置和参考。

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

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