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

后端 未结 11 878
借酒劲吻你
借酒劲吻你 2020-12-04 13:47

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 shou

相关标签:
11条回答
  • 2020-12-04 14: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

    0 讨论(0)
  • 2020-12-04 14:22

    This feature is now available for Visual Studio 2012 at Web Platform Installer. Just search for ASP.NET and Web Tools 2012.2.

    How to install ASP.NET and Web Tools 2012.2

    0 讨论(0)
  • 2020-12-04 14:24

    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

    0 讨论(0)
  • 2020-12-04 14:24

    Here are the steps to use ASP.NET MVC 5 in Visual Studio 2012:

    • Start your ASP.NET MVC 4 project.
    • Install-Package Microsoft.AspNet.WebApi -pre
    • Install-Package Microsoft.AspNet.Mvc -Pre
    • Install-Package Microsoft.AspNet.SignalR -Pre

    These two will update:

    • Microsoft.AspNet.Mvc 5.0.0-rc1
    • Microsoft.AspNet.Razor
    • Microsoft.AspNet.WebApi 5.0.0-rc1
    • Microsoft.AspNet.WebApi.Client 5.0.0-rc1
    • Microsoft.AspNet.WebApi.Core 5.0.0-rc1
    • Microsoft.AspNet.WebApi.WebHost 5.0.0-rc1
    • Microsoft.AspNet.WebPages 3.0.0-rc1
    • and some other goodies

    If these upgrades did not update your web.config, then check out this useful page: upgrading from MVC4 to MVC5.

    0 讨论(0)
  • 2020-12-04 14:28

    Microsoft has provided for you on their MSDN blogs: MVC 5 for VS2012. From that blog:

    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.

    You can download and start using these features now.

    The download link is to a Web Platform Installer that will allow you to start a new MVC5 project from VS2012.

    0 讨论(0)
  • 2020-12-04 14:29

    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
    0 讨论(0)
提交回复
热议问题