Namespace System.Web.Http.Results not found within asp.net web api application

偶尔善良 提交于 2019-12-09 21:45:28

问题


I have an asp.net web api application in which I have this line :

using System.Web.Http.Results;

My problem is that the namespace isn't recognized, I verified the dll system.Web.Http exists in the bin folder !!

So I need to know:

  • What is the reason of this problem?
  • How can I fix it?

回答1:


You need reinstalling the NuGet package, which corrects broken dependencies. Open package manager and run Update-Package Microsoft.AspNet.WebApi -reinstall.




回答2:


The above solution didn't work for me as it was failing on some other package too. My solution was to delete the packages folder and rebuild the project, which retrieved all the packages again.



来源:https://stackoverflow.com/questions/40976979/namespace-system-web-http-results-not-found-within-asp-net-web-api-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!