ReadAsAsync is declared in the class HttpContentExtensions, which is in the namespace System.Net.Http in the library System.Net.Http.Formatting.

Right click on project and click Add a reference option, then go to Extensions from Assemblies tab and choose System.Net.Http.Formatting. If its not there then add manually this assembly, which is also available in the folder:C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies.


Alternate Solution:

Execute below command in NUGET console, make sure command is executed only relevant to that project

Install-Package Microsoft.AspNet.WebApi.Client



blog comments powered by Disqus