Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading a project to MVC 5

I have been looking for a solution to upgrade a current MVC 4 app that i have to use the new MVC 5 binaries. I cannot find a solution anywhere.

Anyone have any ideas?

like image 819
ncbl Avatar asked Aug 28 '13 18:08

ncbl


People also ask

What is the difference between MVC 4 and MVC 5?

Identity feature in mvc4 is not available where as this is available in mvc5. 2. Authentication filter is not available in MVC4 where as Authentication filter is available in MVC5. Authentication filter is a new kind of filter in ASP.NET that runs prior to the authentication in MVC.

How to upgrade MVC 3 to MVC 5 in Visual Studio?

Step 1: Open your MVC 3 application in Visual Studio and change the .net framework to 4.5 as MVC 5 runs on this framework. Step 2: Install Asp.Net MVC 5 version through Package Manager Console. Nuget Package Manage → Package Manager Console and run above command. Step 4: Check System.Web.Razor, System.Web.Helpers, System.WebPages.Razor versions.

How to migrate an MVC 3 application to MVC 5?

In this article we discuss about how to migrate an MVC 3 application to MVC 5. Step 1: Open your MVC 3 application in Visual Studio and change the .net framework to 4.5 as MVC 5 runs on this framework. Step 2: Install Asp.Net MVC 5 version through Package Manager Console. Nuget Package Manage → Package Manager Console and run above command.

How do I create an MVC application in Visual Studio?

Configure the project to use .NET Framework 4.6.1. In the next dialog, choose MVC application, then select Create. Review the created project and its files, especially its project file (s).

How to change the GUID of a MVC 4 project?

Final Steps. 1 In Solution Explorer, right-click the project name and then select Unload Project. 2 Right-click the project and select Edit ProjectName.csproj. 3 Locate the ProjectTypeGuids element and then remove the MVC 4 project GUID, {E3E379DF-F4C6-4180-9B81-6769533ABE47}. 4 Save and close the open project file. 5


2 Answers

Visual Studio 2013 will automatically upgrade a project simply by allowing the Nuget Package Manager to run Updates.

Steps:

In Visual Studio 2013, open the project and right click on the project name to open the Properties window. Change the Target Framework to at least 4.5.

Then, on the project right click on the References item, and select Manage NuGet Packages. On the right side of the window select "Updates", and underneath select "All". This should begin a search for all packages needing to be updated. When the search completes an "Update All" button will appear which if clicked, will update all packages.

Note, my project had the UpgradeMvc3ToMvc4 package. It could not upgrade this so I uninstalled it first, but allowed the dll's to remain when asked.

like image 153
MichaelB Avatar answered Oct 19 '22 21:10

MichaelB


See https://learn.microsoft.com/en-us/aspnet/mvc/overview/releases/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2 Microsoft info. It works for me ...

like image 45
Jorge Rocha Avatar answered Oct 19 '22 22:10

Jorge Rocha