问题
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