Skip to content

Instantly share code, notes, and snippets.

@juristr
Last active August 29, 2015 13:56
Show Gist options
  • Save juristr/9225849 to your computer and use it in GitHub Desktop.
Save juristr/9225849 to your computer and use it in GitHub Desktop.
Upgrade Gist

Upgrade WebApi beta to latest

Upgrading through the NuGet package manager is a pain

Therefore, I followed these steps

Create a new WebApi template project

Use VS2013 (possibly as it has the latest, most up-to-date templates) and generate a new, fresh WebApi project. Just a simple, empty one.

Verify it compiles and starts successfully and then open the packages.config.

Adjust the NuGet package versions and refresh

Now take the new WebApi references in the template project and copy them over to the project you'd like to upgrade. Once you've done that, execute this PowerShell script which syncs the NuGet packages.

<script src="https://gist.github.com/juristr/6577345.js"></script>

Update Attribute Routing

Search regex: \[Http(\w*)\("([\w{}]*)"\)\]
Replace regex: [Http$1, Route("$2")]

Package Updates

Microsoft ASP.NET MVC

This is necessary to get the System.Web.Mvc referenced from NuGet instead of from the latest local .Net installation.

AutoFac

Use these packages (as of today):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment