6
「System.Net.Http.HttpContent」には、「ReadAsAsync」の定義と拡張メソッドが含まれていません
作成したWeb APIを使用するコンソールアプリを作成しました。コンソールアプリのコードはコンパイルされません。それは私にコンパイルエラーを与えます: '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?) このエラーが発生するテストメソッドを次に示します。 static IEnumerable<Foo> GetAllFoos() { using (HttpClient client = new HttpClient()) { client.DefaultRequestHeaders.Add("appkey", "myapp_key"); var …