How can I add the MVC 5 project template to VS 2012? - c#

I have Visual Studio 2012 and want to add the MVC 5 template.
How can this be done or it is only available in VS 2013?

Update your Visual studio, Here's the link
https://www.microsoft.com/web/handlers/webpi.ashx/getinstaller/WebNode11Pack.appids
You can find more detail from below post.
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

MVC 5/ Razor 3 support for VS 2012 has not shipped yet. If you want to get started with it, you might want to just install VS 2013 express. It will run side by side with VS 2012.

This is what you need: http://www.microsoft.com/en-us/download/details.aspx?id=41532
These are generally some VS2013 asp net features which one can install for vs 2012 (from Microsoft)

You can upgrade your MVC 4 application to MVC 5 as as given in here. See this link also.

Related

ASP.NET MVC template does not exist under MS Visual Studio 2010 new project wizard

I have Visual Studio 2010 Professional installed on my Windows machine. I don't want to uninstall it and install VS 2017 yet, cause it may mess with my VS 2010 projects so please do not suggest that.
The problem I have is that ASP.NET MVC does not show under File->New Project-> Installed Templates -> Visual C#-> Web. I have tried the suggestions of this SO question but it did not help: ASP.NET MVC 4 Visual Studio 2010 project templates not present namely reinstall my templates with devenv /installvstemplates. I installed sometime ago MVC 2, MVC 3 and MVC 4 using the Web Platform Installer but none of them shows up. Can anyone help?

missing "ASP.NET Core Web Application (.NET Core)" template in Visual studio 2015 update 3?

I have Visual studio 2015 update 3. and I don't see the ASP.NET Core Web Application (.NET Core) template.
Do I need to switch to Visual Studio "15" Preview 4 ?
https://www.visualstudio.com/en-us/news/releasenotes/vs15-relnotes
Or will it get added to VS 2015 ? What am I missing?
I faced the same problem...,
Solution that worked for me:
went to Tools > Extensions and Updates > Updates
if the problem is an outdated extension, you will see it under updates else you can search for it in the online tab or you can use this Link
which worked for me.
But I recommend that you use visual studio to get the current version.
Make sure to close visual studio before performing the install.
Updated Download Link
https://www.microsoft.com/net/download/windows
You should install .NET Core 1.0.1 - VS 2015 Tooling Preview 2
Solution that worked for me:
Go to Visual studio tools > Extensions and Updates > Updates -> Visual studio gallary
If you see Update for Microsoft.Net Core hit update and it should work.

How do I use a Local IIS with .NET Core, C# 6 and Visual studio 2015?

Previously when working with .net 4.5 and Visual Studio 2013, I could just right click the project, select Web and choose Local IIS like this:
Here I could select a URL for my application and stuff like that.
However, in Visual studio 2015 it looks like this:
How do I use a local IIS? I dont want to start IIS express everytime, I just want to build and then refresh the page like I always have done... :)
That's because in VS 2013 you're using ASP.NET 4.5 -or similar- Web application.
In VS2015 you can also use that one but as you can see in your screenshots that project properties screen is for ASP.Net 5 preview project
So, for ASP.Net 5 preview there's no current support for Local IIS.
This screenshot is from VS 2015 with both types of projects:
You can take a look to the ASP.Net 5 roadmap here
ASP.NET 5 Schedule and Roadmap
As a Workaround you can follow the 'manual steps' listed in this other stackoverflow post
ASP.NET 5 project hosting on IIS

Visual Studio 2015 Update - MVC not available in IDE

I have a project which uses MVC and Bootstrap (C#). It was working 100% in VS2013. Yesterday, I moved to 2015, but now, all my MVC objects are not recognized by the IDE anymore.
I am getting the design time error:
HtmlHelper does not contain a definition for 'BeginForm'
and all other functions of HtmlHelper.
Is there a step when moving from 2013 to 2015 that is required to allow for MVC functionality to be available in the ide? Note, the solution compiles and runs perfectly. I just don't have code hints and the cshtml files all show errors when editing.
We believe these are occurring because you are currently using MVC 4, and MVC 4 tooling is not included with Visual Studio 2015. Only MVC 5 and MVC 6 tooling is included. If you are in fact using MVC 5 and seeing these issues, please do let us know. You can confirm you are using MVC 4 by opening packages.config and scrolling to the entry for Microsoft.AspNet.Mvc. If the version listed starts with "4", this means you are using MVC 4.
Having said that, we appreciate your feedback and the investment you have made in MVC 4. Based on yours and other customers’ feedback, we are looking into the possibility of making MVC 4 tooling available for Visual Studio 2015. In the meantime, your project will compile and run in Visual Studio 2015 despite the tooling issues. Alternatively, you can keep both Visual Studio 2013 and 2015 installed on your machine side-by-side. That way, you can use Visual Studio 2013 for MVC 4 projects and Visual Studio 2015 for MVC 5 and above projects.

How do I get the “Add Controller” and “Add View” menu options in my ASP.NET MVC 5 project?

I upgraded my solution from MVC 4 to MVC 5 in Visual Studio 2012 using this tutorial. In the last step I removed the ProjectTypeGuid for MVC 4 from my .csproj file.
Now the problem is that I don't see Add Controller, Add View in Visual Studio when I want to create new Controllers/Views.
I read this answer for MVC 4 so I know I need to get the correct ProjectTypeGuid for MVC 5 in order to regain that functionality. I was wondering if anyone knows what that is so that I can add them to my .csproj file?
Install the following items:
Visual Studio 2012 Update 4
Web Tools 2013.1 for Visual Studio 2012 (Web Platform Installer | Direct Download)
Then follow this tutorial to upgrade your MVC 4 project to MVC 5.
Finally make sure your project has the following ProjectTypeGuids:
<ProjectTypeGuids>
{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
</ProjectTypeGuids>
In MVC5 the option you're looking for might be hidden under the Add Scaffold menu option. See the release blog post for more information on MVC5 scaffolding.
Some information gathered from: http://forums.asp.net/t/1950055.aspx
If you are still using Visual Studio 2012 and are looking for a way to have intellisense for your views made for razor 3, if you want to add a new view and a new controller with the proper menu entries in visual studio you probably noticed that with things don’t work as they should.
Simply install the following 2 components:
ASP.NET and Web Tools 2013.1 for Visual Studio 2012 (link to direct download)
Entity Framework 6 Tools for Visual Studio 2012

Categories

Resources