Where can I find a NuGet package for upgrading to System.Web.Http v5.0.0.0?

前端 未结 2 1421
予麋鹿
予麋鹿 2020-12-04 18:45

Just upgraded an ASP.NET MVC4 project to use Unity.WebApi version 5.0.0.0 and it requires System.Web.Http v 5.0.0.0 as per the following error:

Assembly \'Uni         


        
相关标签:
2条回答
  • 2020-12-04 19:14

    I have several projects in a solution. For some of the projects, I previously added the references manually. When I used NuGet to update the WebAPI package, those references were not updated automatically.

    I found out that I can either manually update those reference so they point to the v5 DLL inside the Packages folder of my solution or do the following.

    1. Go to the "Manage NuGet Packages"
    2. Select the Installed Package "Microsoft ASP.NET Web API 2.1"
    3. Click Manage and check the projects that I manually added before.
    0 讨论(0)
  • 2020-12-04 19:27

    You need the Microsoft.AspNet.WebApi.Core package.

    You can see it in the .csproj file:

    <Reference Include="System.Web.Http, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.0.0\lib\net45\System.Web.Http.dll</HintPath>
    </Reference>
    
    0 讨论(0)
提交回复
热议问题