ASP.NET MVC 4 is a framework for building scalable, standards-based web applications using well-established design patterns and the power of ASP.NET and the .NET Framework.
You can use ASP.NET MVC 4 with Visual Studio 2010 and 2012. As of now previous visual studio versions doesn't support ASP.NET MVC 4.
This article will guide you through the step by step installation of ASP.NET MVC 4.
Visual Studio 2012 is already packaged with ASP.NET MVC 4. Visual Studio 2010 was packaged with MVC 2 as MVC 3 and MVC 4 was released after Visual Studio 2010 release.
Visual Studio 2012 Express (Free) version also comes with ASP.NET MVC 4.
To Install ASP.NET MVC 4 to Visual Studio 2010, you must have SP1 installed for VS 2010, If you don't have Service Pack 1 installed for Visual Studio then please click here. This service pack is also available in .ISO format.
There are multiple options available for ASP.NET MVC 4 installation. You may choose the one from the below option.
How to Install
There are three different options for installing ASP.NET MVC 4 for Visual Studio 2010.
- ASP.NET MVC 4 Web Platform Installer for Visual Studio 2010 SP1.
- Download the standalone ASP.NET MVC 4 installer executable.
- Via ASP.NET MVC 4 NuGet Packages
I will be explaining all these options from a beginner's
Using Web Platform Installer
Web Platform Installer makes it easy for you to download, install. ASP.NET MVC 4 also can be installed through the Web PI.
To Install ASP.NET MVC 4 using Web Platform Installer, please click here
When you click on the above link, new tab will get opened with the below page,
Click on the "Install ASP.NET MVC 4" button.
Click on "Install Now" button. That will popup a save dialog as per your web browser setting.
Once the file downloading is completed, then open the file from the downloaded location like above, Once you execute the downloaded file that will prompt a UAC or similar window like below
If you click "Yes" then it will show the below screen
The below files will be downloaded (approx 33 MB) from internet. (If you want to use this setup later also then you can choose standalone installer)
To continue with installation click on "Install" button, and Accept the Licence terms by clicking "Accept" button. Once you "Accepted" then it will download and install ASP.NET MVC 4.
Using Standalone installer
If you want to have a copy of the setup file or if you have multiple machines that needs to be setup with MVC 4 then standalone installer is the right option.
To install ASP.NET MVC 4 with standalone installer, please click here
If you click on the above link then you will be redirected to the below page,
Click Download and Save the file to a particular location.
Once the downloading completed then go to the saved location and then execute the file,
It will show the security message / UAC as per your settings, Click on the "Yes" / "Run" button,
Once you have clicked on the above button then you will get the "Installation" UI.
By clicking the above "Install" button, ASP.NET MVC 4 will be installed for Visual Studio 2010 SP 1.
Just Open Visual Studio 2010 , ASP.NET MVC 4 will be listed in the available templates,
Via Nuget Packages
is a Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework. When you add a library or tool, NuGet copies files to your solution and automatically makes whatever changes are needed in your project, such as adding references and changing your app.config or web.config file. When you remove a library, NuGet removes files and reverses whatever changes it made in your project so that no clutter is left." from NuGet.org
To know more about ASP.NET MVC 4 NuGet package, please click here.
If you have already NuGet package manager installed then you will get the below menu option.
You will get the below screen after clicking on the package manager console,
Then type the below command, (make sure that you have already opened a valid project)
Pressing "Enter" key will execute the command,
Once it's done you can see that the references are added to the project.
The below given packages folder is added to the project location,
the packages folder contains below folders,
If you don't have NuGet Package manager installed then go to Extension manager and search for NuGet
Then Click "Download"
In this article I have explained the installation steps for ASP.NET MVC 4 from a beginner's perspective. I hope you have enjoyed this article.
I have put my time and efforts on all of my articles, please don't forget to mark your votes, suggestions and feedback to improve the quality of this and upcoming articles.