GlobalConfiguration.Configure() not present after Web API 2 and .NET 4.5.1 migration

后端 未结 11 1963
后悔当初
后悔当初 2020-12-02 08:24

I recently started following this guide to migrate my project to .NET 4.5.1 and Web Api 2.

The very first thing MS developer Rick Anderson asks you to do is change:<

11条回答
  •  眼角桃花
    2020-12-02 08:52

    None of these ideas helped my project using MVC 5.2.2.

    • System.web.Http 5.2.2 was already installed
    • Deleting the Packages folder and completely re-downloading all NuGet libraries did nothing
    • Web.config already had a dependentAssembly entry for System.Web.Http

    Forcing a reinstall corrected the problem. From the NuGet package manager console:

    update-Package -reinstall Microsoft.AspNet.WebApi.WebHost

提交回复
热议问题