I use System.Net.Http.HttpClient to access the leisure service. This code compiles and works very well:
var client = new HttpClient(); var result = client.GetAsync(ServiceUrl + "/whatever").Result; var content = result.Content.ReadAsAsync<StatusReport>().Result;
However, the ReadAsAsync method is red in my IDE and intellisense cannot find it. I made sure to update all my nuget packages. The link and the added using statement for System.Net.Http.Formatting , but the error persists (and resharper tells me that the use statement is not used).
I'm not sure if this is a problem with visual studio 2012 or with resharper 7. Sometimes restarting Visual Studio helps, and sometimes not. I suspect that I might have some older version of the assembly reference, or something like that, but I updated everything I know and the problem is still intermittent.
What else can I try?
source share