45

Does Visual Studio 2015 support the older versions of MVC:

  • MVC3
  • MVC4
  • MVC5

Not all hosting environments support the newer versions of MVC, so to support needs of older infrastructure this is required.

If it is supported how do you create new solutions using the older MVC versions in Visual Studio 2015? By default new MVC projects are created as version 5.2.

Amirhossein Mehrvarzi
  • 18,024
  • 7
  • 45
  • 70
user3610920
  • 1,582
  • 2
  • 13
  • 24
  • 2
    MVC 5.2 is the currently supported package. You can *open* an existing project using an earlier version of MVC in Visual Studio 2015. But why you would ever want to *create* a web app in an earlier version of MVC today in any IDE, 2015 or otherwise, is beyond me. – Claies May 08 '15 at 16:23
  • 1
    If you search the gallery, there may be an MVC3 or 4 template somewhere. – James Parsons May 10 '15 at 14:45
  • But i had a requirement to do so. VS 2010-mvc2,mvc3. VS2012-mvc3,mvc4. VS-2013-mvc4,mvc5. likewise VS2015 supports which versions of mvc? – user3610920 May 11 '15 at 03:50
  • Cleaning up for readability and clarifying the need to prevent flaming. – VulgarBinary May 14 '15 at 02:30
  • I have not used/downloaded VS2015 but the different versions of MVC from v3 are available through NuGet, so you start with an empty template, and install the Nuget package for the version of MVC that you like instead of the default that comes with the MVC template, or ASP.NET 5 template. – Frank Fajardo Jul 19 '15 at 06:09
  • 2
    I noticed issues working on an older MVC3 web app...I am getting compiler errors, only in the editor, when trying to compile with a .CSHTML page open. It doesn't seem to recognize the references to MVC objects such as ViewBag from the CSHTML. This doesn't happen for me on newer versions of MVC or with VS2013. If the CSHTML page is close, the compile is successful. – ctorx Jul 23 '15 at 05:04
  • If a hosting environment does not support MVC5 yet (which was released in 2013), I say... ditch that hosting! – Rosdi Kasim Jul 26 '15 at 02:16
  • In what way would a hosting environment not support mvc6? Can't you just bin deploy the required dll's? – jao Dec 08 '15 at 09:57
  • This is an old thread, but I am sitting with the same issue. Currently developing in MVC 5 and requires Full Trust Levels, so hosting on a partial hosting environment(shared hosting) will not work. I have tried bin deploy, but made no difference. I can not ditch the SP as there is a 3rd party involved that is doing the hosting. So I need to use an older version of MVC(which I DONT want to do) - but what other option do I have if I can not change the SP ? – AxleWack Aug 19 '16 at 11:54

3 Answers3

32

Does Visual Studio 2015 support the older versions of MVC?

Yes, It support them just after a migration (for adding/supporting new features in IDE like Intellisense and etc).

how do you create new solutions using the older MVC versions in Visual Studio 2015?

This is not an intellectual action since the newer platforms have a lot of fixes and advantages rather than prior ones. Unless, you may be forced to use an older one due to lack of hosting support, In this case you can't Create an older version of MVC project by the IDE (VS 2015) itself, unless by adding older assembly references and some handy works in configuration based on your complete awareness of older required files and architecture, since the newer IDE usually don't have the previews references.

Note: The VS 2015 is just an IDE (Integrated Development Environment). You can run any MVC version on it (with above considerations), But the IDE's new features will be limited likely. For example, the result of MVC 4 migration in VS 2015 will be:

ASP.NET MVC 4 projects have limited functionality in Visual Studio Next. Commands such as Add Controller, Add View, Add Area, and Go to View/Controller are not available. Intellisense for Razor (CSHTML and VBHTML) files is limited to HTML markup. Please see http://go.microsoft.com/fwlink/?LinkID=320968 for additional information on how to upgrade an MVC 4 project.

Which suffers from the lack of Intellisense and etc. But you can still run/develop the project with it or another IDE like Visual Studio Code and debugging the projects will make sense here.

Amirhossein Mehrvarzi
  • 18,024
  • 7
  • 45
  • 70
  • 1
    VS2015 doesn't support MVC 3. It's missing razor support among other things. Van Kichline's answer is the correct one. – RMuesi May 12 '17 at 00:29
  • @RMuesi What's the complete definition for "Support" keyword? Do you mean `Razor` is a strange thing in VS?! Or lack of Intellisense? – Amirhossein Mehrvarzi May 12 '17 at 13:24
  • when someone asks if visual studio supports old versions of MVC i'd expect that to mean are the normal features that make up MVC functionality in VS supported. Razor syntax and intellisense are definitely part of that. – RMuesi May 12 '17 at 15:44
  • @RMuesi So what's the definition of `normal features that make up MVC functionality` as you said? I think you're not educated enough. And you have not enough attention to my answer where I said "after a migration ...". Chatting about an answer is forbidden here. – Amirhossein Mehrvarzi May 12 '17 at 21:21
22

Visual Studio 2015 RTM supports MVC 5 and MVC 6 only; tooling and Razor support are missing for MVC4 and earlier versions. Note that MVC4 projects will be migrated automatically and should compile and run on VS 2015 RTM, but the editing experience in Razor views will be poor.
There has been significant negative feedback concerning this change since release, and the team is planning to ship MVC4 support for 2015 RTM. Watch the WebDev Blog for an official announcement soon.
The Send-a-Smile feature in Visual Studio 2015 is responsible for the rapid acquisition of this feedback and the decision to respond quickly. Consider using Send-a-Smile if feature changes impact you negatively.

Van Kichline
  • 1,703
  • 1
  • 14
  • 15
  • 3
    Update 1 has shipped, and MVC4 projects are now fully supported. You cannot create new MVC4 projects in VS 2015, but you can do everything else with them after installing the update. – Van Kichline Dec 07 '15 at 22:34
10

The Visual Studio 2015 Update 1 RC should support MVC 4 projects. See https://msdn.microsoft.com/en-us/library/mt591926.aspx

Eivind Eriksen
  • 101
  • 1
  • 4