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

后端 未结 11 1952
后悔当初
后悔当初 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:50

    None of these solutions worked for me. I had a tangle of Nuget packages that couldn't update because of circular dependencies on each other.

    I would up having to fix this the old-fashioned way. I created a new MVC/web api project and manually copied System.Web.Http and System.Web.Http.WebHost from the new project into the Nuget folders of the exisitng solution. From there I updated the references by, OMG, "browsing" and fixed the problem.

提交回复
热议问题