„System.Net.Http.HttpContent” nie zawiera definicji „ReadAsAsync” ani metody rozszerzenia

Zrobiłem aplikację konsolową do korzystania z Web API, którego właśnie dokonałem. Kod aplikacji konsoli nie kompiluje się. Daje mi błąd kompilacji:

'System.Net.Http.HttpContent' does not contain a definition for 
'ReadAsAsync' and no extension method 'ReadAsAsync' accepting a 
first argument of type 'System.Net.Http.HttpContent' could be 
found (are you missing a using directive or an assembly reference?)

Oto metoda testowa, w której występuje ten błąd.

static IEnumerable<Foo> GetAllFoos()
{
  using (HttpClient client = new HttpClient())
  {
    client.DefaultRequestHeaders.Add("appkey", "myapp_key");

    var response = client.GetAsync("http://localhost:57163/api/foo").Result;

    if (response.IsSuccessStatusCode)
      return response.Content.ReadAsAsync<IEnumerable<Foo>>().Result.ToList();
  }

  return null;
}

Użyłem tej metody i pobrałem ją z klienta MVC.

questionAnswers(6)

yourAnswerToTheQuestion