Click here to Skip to main content
Click here to Skip to main content

ASP.NET MVC 4 - Part [0] - Setup Environment

, 7 Mar 2013
Rate this:
Please Sign up or sign in to vote.
Setup Environment for ASP.NET MVC 4 in Visual Studio. (Install ASP.NET MVC 4 using Web Platform Installer / Standalone Installer / Nuget )

Introduction  

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.

Background    

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 perspective. 

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,

ASP.NET MVC 4 Install Web Platform Installer - Shemeer NS

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,

ASP.NET MVC 4 Install using Standalone Installer - Shemeer NS

Click Download and Save the file to a particular location.

ASP.NET MVC 4 Install using Standalone Installer - Shemeer NS

ASP.NET MVC 4 Install using Standalone Installer - Shemeer NS

Once the downloading completed then go to the saved location and then execute the file,

ASP.NET MVC 4 Install using Standalone Installer - Shemeer NS

It will show the security message / UAC as per your settings, Click on the "Yes" / "Run" button,

ASP.NET MVC 4 Install using Standalone Installer - Shemeer NS

Once you have clicked on the above button then you will get the "Installation" UI.

ASP.NET MVC 4 Install using Standalone Installer - Shemeer NS

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,

ASP.NET MVC 4 - Visual Studio 2010 SP 1 - Shemeer NS 

Via Nuget Packages 

"NuGet 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,

ASP.NET MVC 4 Install using Nuget package - Shemeer NS

Then type the below command,  (make sure that you have already opened a valid project) 

Install-Package AspNetMvc  

Pressing "Enter" key will execute the command,

Once it's done you can see that the references are added to the project.

ASP.NET MVC 4 Install using Nuget package - Shemeer NS

The below given  packages folder is added to the project location,

ASP.NET MVC 4 Install using Nuget package - Shemeer NS

the packages folder contains below folders, 

ASP.NET MVC 4 Install using Nuget package - Shemeer NS

If you don't have NuGet Package manager installed then go to Extension manager and search for NuGet

ASP.NET MVC 4 Install using Nuget package - Shemeer NS

Then Click "Download"

ASP.NET MVC 4 Install using Nuget package - Shemeer NS

ASP.NET MVC 4 Install using Nuget package - Shemeer NS 

Troubleshooting     

Summary    

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.     

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Shemeer NS
Software Developer (Senior)
India India
Technology Specialist | CodeProject MVP | Visual Studio Gallery Contributor | Author | Geek | Netizen | Husband | ChessPlayer
 
Most of my articles are listed on top 5 of the respective 'Best articles of the month' and some of my articles are published on ASP.NET WebSite's Article of the Day section.
 
Check my contributions in Visual Studio Gallery and Code Project
 
Technical Blog: http://www.shemeerns.com
Facebook: http://facebook.com/shemeernsblog
Twitter : http://twitter.com/shemeerns
Google+ : http://google.com/+Shemeernsblog
Follow on   Twitter   Google+

Comments and Discussions

 
GeneralA lot of images PinmemberViolet Tape4-Oct-12 17:31 
GeneralRe: A lot of images PinmemberShemeer NS4-Oct-12 20:19 
GeneralRe: A lot of images [modified] PinmemberVaso0078-Oct-12 2:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140718.1 | Last Updated 7 Mar 2013
Article Copyright 2012 by Shemeer NS
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid