218

I'm starting a new project, and would like to give a try to MVC 5 (I have built a web app using MVC 4 before).

In Visual Studio 2013, I click the New Project and navigate to Visual C# > Web > Visual Studio 2012 (even though I have installed VS 2013 it says 2012 in the menu) and on that list I only have MVC 4 application - not 5.

The framework in the drop down menu is set to .NET Framework 4.5.1 - and still nothing.

I've checked Tools > Extensions and Update and searched for MVC 5 - but it doesn't find anything official from Microsoft.

How can I add MVC 5 to my Visual Studio 2013?

Thank you

Stephen Kennedy
  • 20,585
  • 22
  • 95
  • 108
developer82
  • 13,237
  • 21
  • 88
  • 153
  • 1
    http://www.hanselman.com/blog/OneASPNETSneakPeekElegantWebFormsAndSnowballsInHell.aspx http://msdn.microsoft.com/en-us/magazine/dn198242.aspx – SLaks Jan 13 '14 at 16:51

8 Answers8

282

Visual Studio 2013 no longer has separate project types for different ASP.Net features.

You must select .NET Framework 4.5 (or higher) in order to see the ASP.NET Web Application template (For ASP.NET One).
So just select Visual C# > Web > ASP.NET Web Application, then select the MVC checkbox in the next step.

Note: Make sure not to select the C# > Web > Visual Studio 2012 sub folder.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • 7
    Once I've created a new ASP.NEt Web Application and choose MVC and WEB API - it didn't ask me which MVC version to use. How do I know if right now I'm working under MVC 4 or 5? – developer82 Jan 13 '14 at 17:05
  • 5
    @developer82: Check the versions in the NuGet packages or assembly references. It should always use the latest version available on NuGet. – SLaks Jan 13 '14 at 17:24
  • 7
    Just to add my own comment you *must* select **.NET Framework 4.5** (or higher) in order to see the *ASP.NET Web Application* template. If it's lower, then it will show older version templates, ie MVC 4 Web Application or Web Forms. Confused me for a while as I mostly have to stick with older versions of the framework. – Richard Moss Jul 02 '14 at 07:16
  • I don't understand. Somehow I don't have the "web" node under C# in the templates explorer. I installed VS2013 via Chocolatey, so perhaps there's an issue with the way it's been packaged? – Neil Barnwell Oct 12 '14 at 23:01
69

MVC 5 is already built into Visual Studios 2013.

  1. Open a new project, on the left make sure you are under Templates > Visual C# > Web not Templates > Visual C# > Web > Visual Studios 2012.

  2. Important: Now look near the top of the new project dialog box and select .NET 4.5 or higher. Once under web and the proper framework is selected click ASP.NET Web Application in the middle pane. Click OK

  3. This will bring you to a page where you can select MVC as the project and start the wizard.

K.J.
  • 921
  • 7
  • 7
  • I tried this and it didnt help. In my Templates > C# There is no MVC template. – Preza8 Feb 10 '15 at 08:53
  • 4
    There is no template called "MVC", the template is called "ASP.NET Web Application". Once you chose that one, you can pick MVC in the next window. – EluciusFTW Feb 19 '15 at 10:12
49

Go File -> New Project.

Select Web under Visual C#.

Select ASP.NET Web Application

Click OK.

New Project Dialog

Select MVC.

Click OK.

ASP.Net Dialog

Donal
  • 31,121
  • 10
  • 63
  • 72
  • 7
    Not easy drawing circles with a mouse is it? :) Try using ShareX. Works a treat! – Piotr Kula Oct 16 '15 at 09:53
  • I had the same problem. This solution helps a lot. My error was to not start a new project but a new website and then the MVC option isn't showed by visual studio. You can however select razor v3 (or 2 didn't try it to have MVC websites). – Agguro Oct 22 '15 at 07:20
  • This did not work for me. I do not get an MVC option when I select Web Application and click ok, MVC does not appear as an option. It does under Visual Studio 2012 but only version 4. I am looking for version 5 – Mark Ainsworth Apr 30 '16 at 13:21
6

With respect to other answers, it's not always there. Sometimes on setup process people forget to select the Web Developer Tools.

In order to fix that, one should:

  1. Open Programs and Features find Visual Studios related version there, click on it,
  2. Click to Change. Then the setup window will appear,
  3. Select Web Developer Tools there and continue to setup.

It will download or use the setup media if exist. After the setup windows may restart, and you are ready to have fun with your Web Developer Tools now.

Tolga Evcimen
  • 7,112
  • 11
  • 58
  • 91
1

Go File -> New Project.

Select Web under Visual C#.

Select ASP.NET Web Application

select mvc

when solution is created, you will find resources getting added in solution in status bar of vs 2013.

Check property of Dll file --> system.web.mvc, it shows latest version (5.2.2.0)

but depending on your OS runtime version will be decided.

aky
  • 11
  • 1
0

Also, while installing Visual Studio 2013, ensure that you have checked "Web Developer Tools"

Cătălin Rădoi
  • 1,804
  • 23
  • 43
0

You can look into Windows installed folder from here of your pc path:

C:\Program Files (x86)\Microsoft ASP.NET

View of Opened file where showing installed MVC 3, MVC 4

enter image description here

Anjan Kant
  • 4,090
  • 41
  • 39
-1

Select web development tools when you install the visual studio 2013. Then it will work properly and show the asp.net web applicaton.

smottt
  • 3,272
  • 11
  • 37
  • 44
nagaraja T
  • 29
  • 4