How do I install ASP.NET MVC 5 in Visual Studio 20

2019-01-13 02:30发布

Is there a way to install ASP.NET MVC 5 in Visual Studio 2012?

I've tried using NuGet (http://www.nuget.org/packages/Microsoft.AspNet.Mvc). But I think that it should come as a Visual Studio extension, but I can't find that anywhere.

Or it is available only in Visual Studio 2013?

11条回答
Anthone
2楼-- · 2019-01-13 03:10

You can use Visual Studio 2012.

Simply update your NuGet package in Visual Studio to Microsoft.AspNet.Mvc 5.0.

You may have to search pre-release.

Also the default project comes with Entity Framework 6.0, and ASP.NET Razor 3.0.

You may also need ASP.NET Identity Core and OWIN.

All of these can be downloaded/updated through menu ToolsLibrary package managerManage NuGet Packages for Solution....

If you don't yet have NuGet, follow this tutorial:

http://docs.nuget.org/docs/start-here/installing-nuget

查看更多
不美不萌又怎样
3楼-- · 2019-01-13 03:10

I had trouble with the web installer not "finding the product"

The stand alone installer is located here:

https://www.microsoft.com/en-us/download/details.aspx?id=41532

The release/installation notes can be found at

http://www.asp.net/visual-studio/overview/2012/aspnet-and-web-tools-20131-for-visual-studio-2012

Dependency:

  • .NET 4.5
  • You need to select this version of the framework when creating a new project in order to view the MVC 5 project templates.

Included:

  • MVC5
  • Entity Framework 6
  • Web API 2
  • Bootstrap
  • Razor
  • Nuget 2.7
查看更多
冷血范
4楼-- · 2019-01-13 03:13

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

OK, so that gets you to be able to start from a blank ASP.NET MVC project, but a lot of people want the FULL INTERNET APPLICATION as shipped with Visual Studio 2013.

So I have a step 2: http://httpjunkie.com/2013/340/develop-mvc-5-with-asp-net-identity-in-visual-studio-2012/

If you follow that tutorial on my website I follow it up with a full install of Foundation 5 and a cool Hybrid OffCanvas/Top-Bar navigation.

查看更多
Melony?
5楼-- · 2019-01-13 03:13

If you want to install ASP.NET MVC 5 and ASP.NET Web API 2 into VS 2012 Ultimage so, you can download MSI installer from
http://www.microsoft.com/en-us/download/details.aspx?id=41532.

I have downloaded and intalled just know. I got MVC 5 and Web API 2
:)

查看更多
闹够了就滚
6楼-- · 2019-01-13 03:16

You should be able to install from NuGet (http://www.nuget.org/packages/Microsoft.AspNet.Mvc) into VS2012. Change the Target Framework to .NET 4.5.

Not sure the new project templates are ready for VS2012. But if you have an ASP.NET MVC 4 app you can upgrade using the link below.

http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and-web-api-2

查看更多
疯言疯语
7楼-- · 2019-01-13 03:16

FYI. You can now just update VS 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

"We have released ASP.NET and Web Tools 2013.1 for Visual Studio 2012. This release brings a ton of great improvements, and include some fantastic enhancements to ASP.NET MVC 5, Web API 2, Scaffolding and Entity Framework to users of Visual Studio 2012 and Visual Studio 2012 Express for Web."

查看更多
登录 后发表回答