[visual-studio-2015] Missing MVC template in Visual Studio 2015

When I create a new web project with Visual Studio, I only see the templates in the picture below: missing MVC template

The MVC one is missing and so I can only create empty projects.

I tried with a repair of Visual Studio, but no luck.

Any suggestions?

This question is related to visual-studio-2015

The answer is


In my case that happened when uninstalling AspNet 5 RC1 Update 1 to update it for .Net Core 1.0 RC2. so I installed Visual Studio 2015 update 2, selected Microsoft Web Developer tools and everything went back to normal.


Visual Studio 2015 (Community update 3, in my scenario) uses a default template for the MVC project. You don't have to select it.

I found this tutorial and I think it answers the question: https://docs.asp.net/en/latest/tutorials/first-mvc-app/start-mvc.html

check out the old versions of this: http://www.asp.net/mvc/overview/older-versions-1/getting-started-with-mvc/getting-started-with-mvc-part1

http://www.asp.net/mvc/overview/getting-started/introduction/getting-started

Times have changed. Including .NET


I don't think the accepted answer works anymore. According to Microsoft here, here, and here, has been re-branded to ASP.Net Core. It looks like they've taken down the templates from the general ASP.Net Web Application project type. But now there's a new project type of ASP.Net Core Web Application. enter image description hereI don't see an MVC template for this project type, but I don't think the Core framework has been completely released yet.


I had the same issue with the MVC template not appearing in VS2015.

I checked Web Developer Tools when originally installing. It was still checked when trying to Modify the install. I tried unchecking and updating the install but next time I went back to Modify, it was still checked. And still no MVC template.

I got it working by uninstalling: Microsoft ASP.NET Web Frameworks and Tools 2015 via the Programs and Features windows and re-installing. Here's the link for those who don't have it.


For me, I saw none of the MVC templates (except the bottom two), after installing Update 3 which installed all the Core stuff.

missing mvc

Solution

I downloaded most recent core preview...

corepreview

It prompted me for "repair" and after it was done, bringing up VS indicated it was "Installing Templates" and they appeared!

Warning

Update 3 is a game changer in that the "preferred" way of doing things is to use dotnetcore. For example a console application now uses the new file stucture, other projects such as a Test Project still use the same folder structure as before. But MVC has changed. I'm not even sure what other "Web Developer Tools" work with dotnetcore right now.


I'm going to add my 2 cents in case someone finds himself in a position like mine. I too was looking for an MVC project type and could not see it. All I saw is a "Web Application Project". So I freaked out and rushed into trying all solutions listed on this page.

But.

IT IS ACTUALLY THERE.

enter image description here

Just go with the "Web application" project and it will give you the MVC option on the next step.


Other answer looks old.

For Visual Studio 2017, screen shots are below


New project


ASP.NET web Application


 MVC option


 MVC in solution explorer



Just click on the "web" in left side-bar and select "ASP.NET Web Application", click "ok" and you will see next dialog:

Now, you can choose type of web application what you want.


Visual studio 2015 does not show MVC project template if you select .Net 4.0 or below. Select .Net 4.5 or above, and you will be able to see MVC project.

This is what showed when you select .NET Framework 4:

enter image description here

and this when you select .NET Framework 4.5:

enter image description here

However, make sure you have installed web developers tools. To do so, go to Add / remove programs -> Visual 2015 -> Modify --> Web developer tools : Check and proceed with the installation.


write this in nuget console Install-Package Microsoft.AspNet.Mvc -Version 5.2.3