22

I'd like to get started with ASP.NET MVC 5 using Visual Studio 2012. I've installed the "ASP.NET And Web Tools 2013 for Visual Studio 2012, but this "only" gives me an "Empty ASP.NET MVC 5 Project" template.

For MVC4 web projects, I can select different kinds of Web applications (like "Standard", "Internet", "Intranet" etc.). And I've seen screenshots with similar options for Visual Studio 2013.

Are there any project templates (for VS2012) which allow me to do the same for MVC5 applications?

MartinStettner
  • 28,719
  • 15
  • 79
  • 106
  • 1
    Would this help you? http://stackoverflow.com/questions/18288215/how-can-i-add-the-mvc-5-project-template-to-vs-2012 – Spock Nov 23 '13 at 12:31
  • That question helped me in installing the "Web Tools 2013" :) So it is clearly related, but, as i said, it only installs one single template. – MartinStettner Nov 23 '13 at 20:25
  • My answer is not a template, but it will get you up and running with an MVC 5 project and the basics. Just like a template would. – Eric Bishard Dec 16 '13 at 07:01
  • You should mark an answer that helped you out the most in your question! – Eric Bishard Jan 13 '14 at 21:44

4 Answers4

15

It seems that "currently" there is only included the Empty Project template, and MS officially hasn't released all other templates for VS2012. For ASP.NET MVC 5 you can use the scafolding to add the Controllers, Views etc. This is the same for WebAPI templates.

ASP.NET MVC 5 template
We added a new MVC 5 template. It references the latest MVC 5 NuGet packages, and you can use scaffolding to add controllers and views.

Also see the RELEASE NOTES

enter image description here

Spock
  • 7,009
  • 1
  • 41
  • 60
  • It's an empty project and it's not the same as a full mvc5 application. How is this a better answer? – Eric Bishard Sep 17 '14 at 04:00
  • The answer is based on the question "Are there any project templates (for VS2012) which allow me to do the same for MVC5 applications?" Not about whether the provided template is better or not. As per the answer MS have decided to give the ability for the user to add scaffolding to the project. – Spock Sep 17 '14 at 05:46
  • Has Visual Studio "to date" added the Full MVC 5 application template in any type of update, add on or Web Essential type plugin? SOrry if the comment before sounded like I was being a dick. In fact I kind of was being one because I didn't read through everything as I should have. But do you know of any templates to date as this question is kind of old? – Eric Bishard Sep 18 '14 at 07:06
  • Sorry, not sure to be honest. Latest version of VS/update might have provided, but at the time I answered this, it wasn't the case. – Spock Sep 18 '14 at 07:42
  • This feature is now available for VS.2012 at `Web Platform Installer`. Just search for `ASP.NET and Web Tools 2012.2` and add to install: http://i.stack.imgur.com/pRTSe.jpg – Rodrigo Reis Jan 20 '16 at 16:02
10

Not sure if you are interested in this answer, but I have a tutorial that will not only get your empty MVC 5 project working with Bundling, a controller, jQuery, jQuery UI, Modernizr and more, but it will walk you through installing Zurb's Foundation 5, a responsive Framework which I have working with Sass in MVC 5. It's all here:

http://httpjunkie.com/2013/158/install-zurbs-foundation-5-in-net-mvc-5/

The problem many have ran into is that Visual Studio 2012 only allows you to start from a blank MVC 5 project, so I will help you get the NuGet installed which is pretty similar to the instructions in the NuGet package with a few minor changes; however, it does not take into consideration that you will be installing from Visual Studio 2012 using a Blank MVC 5 project. If you would like to use Foundation 5 with MVC 4 Web Application template just omit the Bootstrap uninstall and the NuGet package should work fine, but if you need to use MVC 5 and you don’t have Visual Studio 2013, you will need to build the Home Controller, Bundling class, modify the Global.asax.cs as well as other quirky little things. So lets get started.

I spent a good part of a few hours getting it all working.

Enrico
  • 10,377
  • 8
  • 44
  • 55
Eric Bishard
  • 5,201
  • 7
  • 51
  • 75
  • 1
    Thanks! This is exactly what I was looking for. I don't want an entire web application templated for me but the empty MVC 5 project doesn't quite have enough for me to get started either. I also happened to be looking to use Foundation instead of the default Bootstrap. – Dooms101 Jan 04 '14 at 17:34
  • Awesome, glad I could help. I also have another tutorial on that site that walks you through getting the mvc 4 application in VS 2012 up to date with the MVC 5 application in VS 2013 but all done in VS 2012. – Eric Bishard Jan 05 '14 at 08:10
  • 1
    YAY!!! SASS and Foundation in MVC with asp.net/VS2012. Haven't seen any examples of this yet. Thanks! – Rachael May 14 '14 at 19:23
  • I'm so glad I documented my process. I actually have went through it a few times myself as a guide. I forget I wrote it. lol – Eric Bishard May 15 '14 at 01:37
3

I just ran across this and going through it now. It seems to be spot on as well as really answering the posters question.

http://httpjunkie.com/2013/340/develop-mvc-5-with-asp-net-identity-in-visual-studio-2012/

Doug Bloch
  • 31
  • 1
  • I hope it is still relevant. I was thinking of going through it and updating it a bit. Considering MVC 5.1, New MVC Templates w/ Identity. Even updates available for VS 2012 might have thrown a few details off in that blog post, but the overall article should still be of help. I'll let you know if I update it, feel free to send me any updates or outdated directions if you see them. – Eric Bishard May 15 '14 at 01:35
  • The link above describes how to convert a MVC4 project to a an MVC5 project. It does not attempt to describe how to convert a blank MVC5 project to a MVC5 Web Application project. – barrypicker Jul 07 '15 at 21:40
0

Use VS2013 express, which has the latest templates, generate the scaffolded project (not empty), then go back to VS2012 and do your work.

jeff
  • 3,269
  • 3
  • 28
  • 45