asp.net core build error : 'HttpRequestMessageExtensions'

核能气质少年 提交于 2020-01-15 03:06:10

问题


Using ASPNet Core 1.1 Web API template and trying to create a response on Post. Getting the below error while building the project. Thanks for your help !

Controllers\MessagesController.cs(37,28,37,72): error CS0433: The type 'HttpRequestMessageExtensions' exists in both 'System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' and 'System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'


回答1:


You should remove reference to System.Web.Http, as ASP.NET Core doesn't use it.



来源:https://stackoverflow.com/questions/42144611/asp-net-core-build-error-httprequestmessageextensions

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