27

For some reason my Visual Studio 2013 Preview cannot create MVC 5 Projects. Since the MVC project is now open source in CodePlex I was wondering if there's a simple way to develop MVC 5 projects in my Visual Studio 2012 Ultimate.

tereško
  • 58,060
  • 25
  • 98
  • 150
Alireza Noori
  • 14,961
  • 30
  • 95
  • 179
  • _"cannot create MVC 5 Projects"_ - explain. What did you do, what happens, what do you expect to happen, what did you try to resolve this yourself? – CodeCaster Jul 31 '13 at 11:10
  • 1
    Well that's not really the question here. I'm looking to see how to use VS2012 for this. I already have posted my feedback to MSFT about this. Hopefully they'll solve it. – Alireza Noori Jul 31 '13 at 15:53
  • Well if your feedback is as extensive as your question here, you will get a _"Click New Project and select MVC 5"_ answer. Did you try anything, does anything not work, not appear, or give an error? – CodeCaster Jul 31 '13 at 17:35
  • @CodeCaster haha. Didn't mean to make you angry. I just wanted us to stay on topic. I posted the feedback along with a video. You're welcome to watch it. It really says it all. Let me know if you want anything more. Sincerely. https://www.dropbox.com/s/6nnwe5u23pte543/MVC.mp4 – Alireza Noori Jul 31 '13 at 21:43
  • I'm not angry. :-) I'm just asking clarification on your question. VS projects are templates. Perhaps you can just use VS2013's MVC templates in VS2012. But like I said, please show what you have tried and what happens. – CodeCaster Aug 01 '13 at 06:32
  • Hmm, haven't tried that one. How can I use those templates? Perhaps you could post it as an answer. – Alireza Noori Aug 01 '13 at 08:22
  • 2
    intersting... i have vs 2012.. not planning to switch to 2013 any time soon... I would really want to know how to create mvc5 project using vs2012 – Bilal Fazlani Aug 09 '13 at 12:34

5 Answers5

36

Microsoft has released updated Web Tools 2013.1 that provide the support:

Note that I had to install it manually from the second link, the tools did not install properly from Web Platform Installer. Also a colleague had to install both Update 4 and these tools to get proper support.


Original answer (not actual anymore):

I received this answer from Microsoft developer:

MVC 5/Razor 3 tooling support for VS 2012 has not shipped yet. We hope to ship this support in Mid November.

Recently ASP.NET Program Manager from Microsoft mentioned in a talk that this would be included in VS2012 Update 4. Edit: unfortunately the support is not in Update 4.

So the accepted answer is true for now but we can plan to soon have this support in VS2012 as well.

Knaģis
  • 20,827
  • 7
  • 66
  • 80
  • 1
    I have updated to Update 4 and Razor 3 is still not supported. – DodyG Nov 18 '13 at 10:45
  • I sent an e-mail to Microsoft, they said that the support is still in works and has not been shipped. Unfortunately they did not say anything more specific :( – Knaģis Nov 18 '13 at 10:58
  • Also do not forget to install Entity Framework 6 for Visual Studio 2012: http://www.microsoft.com/en-us/download/details.aspx?id=40762 – firepol Nov 28 '13 at 13:38
  • @Knaģis, your description link does seem to say that it supports razor tooling with a screenshot. – Samuel Dec 03 '13 at 09:38
27

A new tutorial has been recently added to the ASP.NET website on how to upgrade an MVC4 project to MVC5.

I migrated a VS 2012 project using this tutorial without problems, but there is no design time support for Razor 3 in VS2012 due to changes in the way VS loads the razor engine.

You can edit razor pages in VS2012, but it will be a plain HTML editor.

Natan
  • 4,686
  • 5
  • 30
  • 48
  • 3
    Please vote for the corresponding bug at Microsoft connect: https://connect.microsoft.com/VisualStudio/feedback/details/806348/razor-intellisense-does-not-work-in-visual-studio-2012-after-upgrading-to-mvc-5-razor-3 – Nathan Oct 23 '13 at 19:05
  • 1
    Not any more. As of 10/09 pages will be edited with latest Razor engine instead. – Robert Koritnik Oct 24 '13 at 09:49
  • 8
    MS just released [ASP.NET and Web Tools 2013.1 for Visual Studio 2012](http://blogs.msdn.com/b/webdev/archive/2013/11/18/announcing-release-of-asp-net-and-web-tools-2013-1-for-visual-studio-2012.aspx) which should solve all of the above – cgijbels Nov 18 '13 at 18:24
  • amazing I found your comment 1 hour after you published for the first time looking into this problem. Fixed it. – Bart Calixto Nov 18 '13 at 20:32
4

Microsoft has released an update for this, Web Tools 2013.1 for VS2012.

http://blogs.msdn.com/b/webdev/archive/2013/11/18/announcing-release-of-asp-net-and-web-tools-2013-1-for-visual-studio-2012.aspx

Aaron Stainback
  • 3,489
  • 2
  • 31
  • 32
1

I'm not sure MS will fix it.

The bug report says problem closed : by design

https://connect.microsoft.com/VisualStudio/feedback/details/806348/razor-intellisense-does-not-work-in-visual-studio-2012-after-upgrading-to-mvc-5-razor-3

and it is mid November

user965445
  • 115
  • 1
  • 10
0

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://tinyurl.com/VS12-MVC5-F5

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.

Eric Bishard
  • 5,201
  • 7
  • 51
  • 75