Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Forcing Visual Studio 2013 to Use ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1

DZone's Guide to

Forcing Visual Studio 2013 to Use ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1

·
Free Resource

Introduction:

DISCLAIMER: This was done completely for my own benefit, but I thought this might be useful to others, so I am sharing my work with you. But please backup your files before replacing.

A few days ago, Microsoft announced the release of ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1 and Visual Studio 2013 Update 1. We can now create ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1 application by creating a new web application and update the released NuGet packages(means running Install-Package Microsoft.AspNet.Mvc -Version 5.1.0, Install-Package Microsoft.AspNet.WebApi -Version 5.1.0 and Install-Package Microsoft.AspNet.WebPages -Version 3.1.0). But doing this every time when you create a new web application takes some time and easily forgettable. In this article, I will tell you some quick tips to force Visual Studio 2013 to use the new versions automatically when you create a new web application. 

Description:

First of all download VS2013TemplatesForMVC5.1WebAPI2.1WebPages3.1. These templates will force Visual Studio 2013 to use MVC 5.1, Web API 2.1, Web Pages 3.1 and Katana(Owin) 2.1. The download zip file includes 3 folders. First, copy/paste the contents of 'C Program Files (x86) Microsoft ASP.NET ASP.NET Web Stack 5 Packages' to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Stack 5\Packages. Next, copy/paste the contents of 'C Program Files (x86) Microsoft Visual Studio 12.0 Common7 IDE WebTemplates' to C://Program Files (x86)/Microsoft Visual Studio 12.0/Common7/IDE/WebTemplates and finally copy/paste the contents of 'C Program Files (x86) Microsoft Web Tools Packages' to C:\Program Files (x86)\Microsoft Web Tools\Packages. That's it. Now whenever you create a new web application, Visual Studio will use MVC 5.1, Web API 2.1, Web Pages 3.1 and Katana(Owin) 2.1. So, no need to update the NuGet packages.

Summary:

Creating a new ASP.NET MVC 5.1, ASP.NET Web API 2.1 and ASP.NET Web Pages 3.1 application might be painful because you need to update the NuGet packages every time you create a new web application. In this article, I showed you how to force Visual Studio 2013 to use the new versions automatically when you create new web application. Hopefully you enjoyed my this article too.

Topics:

Published at DZone with permission of Imran Baloch, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}