是否可以将现有的MVC4 Web应用程序升级到MVC5? [英] Is it possible to upgrade an existing MVC4 Web application to MVC5?
问题描述
我想从MVC4升级到MVC5的原因是因为MVC5已经有了Entity Framework Identity。我不想花时间尝试添加身份到我的MVC4项目,因为它需要太多时间。
The reason why I want to upgrade from MVC4 to MVC5 is because MVC5 has Entity Framework Identity already there. I don't want to spend time trying to add Identity to my MVC4 project because it'll take too much time.
有没有像自动执行的更新按钮或者我需要创建一个MVC5模板并复制代码?
Is there like an update button which does it automatically or do I need to create a MVC5 template and copy codes over?
推荐答案
我将MVC4升级到MVC5,这个链接
I upgraded form MVC4 to MVC5 by following the steps at this link
如何将ASP.NET MVC 4和Web API项目升级到ASP.NET MVC 5和Web API 2
,您将逐步从MVC4升级到MVC5
that walk you through steps to upgrade from MVC4 to MVC5
以下是升级步骤的简要摘要。
Here is a quick summary of the upgrade steps.
备份您的项目,因为它会升级涉及更改包配置和web.config文件。
Backup your project, as it upgrade will involve changes to package configuration and web.config files.
从Web API升级到Web API 2通过在
global.asax
$ b $中进行一些更改b确保您的项目使用的所有包与MVC 5和Web API 2兼容。它们提供了Microsoft软件包
Make sure all the packages that your projects use are compatible with MVC 5 and Web API 2. They provide a table of package versions from Microsoft packages
在Visual Studio中打开项目。
Open project in Visual Studio.
使用包管理器控制台(PMC),删除某些ASP.Net NuGet包(如果已安装)。
Using Package Manager Console (PMC), remove certain ASP.Net NuGet packages if installed.
使用PMC升级所有ASP.Net NuGet软件包
Upgrade all the ASP.Net NuGet packages using the PMC
他们显示如何:更新应用程序web.config文件
和更新视图文件夹下的web.config文件
They show how to: Update the Application web.config File
and Update the web.config files under the Views folder
查看链接,看看是否有帮助。
Check out the link and see if that helps.
这篇关于是否可以将现有的MVC4 Web应用程序升级到MVC5?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!