title: MVC Web API 5 Upgrade for CORS support
body: <p>I am trying to use CORS support with Web API, and have installed RC1. I have wasted so much time trying to get CORS to work correctly. Anyhow I have enabled Nightly builds with no avail. I keep getting the following issue and cannot find a solution anywhere on the net. Do you need 2013 VS to play with MVC 5 or install anything new?</p>
  
  <pre><code>Could not load type 'System.Web.Http.Hosting.IHostPrincipalService' from assembly 'System.Web.Http, Version=5.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
  </code></pre>
  
  <p>This is my packages file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;packages&gt;
    &lt;package id="Antlr" version="3.4.1.9004" targetFramework="net45" /&gt;
    &lt;package id="AutoMapper" version="3.0.0-ci1043" targetFramework="net45" /&gt;
    &lt;package id="AutoMapper" version="3.0.0" targetFramework="net45" /&gt;
    &lt;package id="EntityFramework" version="5.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Cors" version="5.1.0-alpha1-131016" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Mvc" version="5.0.0-rc1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Providers.Core" version="1.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Providers.LocalDB" version="1.1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Razor" version="3.0.0-rc1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.Web.Optimization" version="1.0.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi" version="5.0.0-rc1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Client" version="5.1.0-alpha1-131016" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Core" version="5.1.0-alpha1-131016" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Cors" version="5.1.0-alpha1-131016" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.OData" version="5.0.0-rc1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.WebHost" version="5.0.0-rc1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.AspNet.WebPages" version="3.0.0-rc1" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Data.Edm" version="5.6.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Data.OData" version="5.6.0" targetFramework="net45" /&gt;
    &lt;package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" /&gt;
    &lt;package id="Newtonsoft.Json" version="5.0.6" targetFramework="net45" /&gt;
    &lt;package id="NodaTime" version="1.1.1" targetFramework="net45" /&gt;
    &lt;package id="System.Spatial" version="5.6.0" targetFramework="net45" /&gt;
    &lt;package id="WebGrease" version="1.1.0" targetFramework="net45" /&gt;
    &lt;package id="WebGrease" version="1.5.2" targetFramework="net45" /&gt;
  &lt;/packages&gt;
  </code></pre>