<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Channel 9 Forums - Coffeehouse - &#39;System.Net.Http.HttpContent&#39; does not contain a definition for &#39;ReadAsAsync&#39; and no extension method</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/Forums/rss"></atom:link>
	<image>
		<url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url>
		<title>Channel 9 Forums - Coffeehouse - &#39;System.Net.Http.HttpContent&#39; does not contain a definition for &#39;ReadAsAsync&#39; and no extension method</title>
		<link>http://channel9.msdn.com/Forums</link>
	</image>
	<description>Channel 9 keeps you up to date with the latest news and behind the scenes info from Microsoft that developers love to keep up with. From LINQ to SilverLight – Watch videos and hear about all the cool technologies coming and the people behind them.</description>
	<link>http://channel9.msdn.com/Forums</link>
	<language>en</language>
	<pubDate>Wed, 22 May 2013 19:56:30 GMT</pubDate>
	<lastBuildDate>Wed, 22 May 2013 19:56:30 GMT</lastBuildDate>
	<generator>Rev9</generator>
	<c9:totalResults>2</c9:totalResults>
	<c9:pageCount>-2</c9:pageCount>
	<c9:pageSize>-1</c9:pageSize>
	<item>
		<title>Coffeehouse - &#39;System.Net.Http.HttpContent&#39; does not contain a definition for &#39;ReadAsAsync&#39; and no extension method</title>
		<description><![CDATA[<p>I made a console app to consume a Web API I just made. The console app code does not compile. It gives me the compilation error:<br><br><pre class="brush: csharp">'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?)</pre><br><br>Here's a test method in which this error occurs.<br><br><pre class="brush: csharp">static IEnumerable&lt;Foo&gt; GetAllFoos()
{
  using (HttpClient client = new HttpClient())
  {
    client.DefaultRequestHeaders.Add(&quot;appkey&quot;, &quot;myapp_key&quot;);

    var response = client.GetAsync(&quot;http://localhost:57163/api/foo&quot;).Result;

    if (response.IsSuccessStatusCode)
      return response.Content.ReadAsAsync&lt;IEnumerable&lt;Foo&gt;&gt;().Result.ToList();
  }

  return null;
}</pre><br><br>I have used this method and consumed it from an MVC client.</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/SystemNetHttpHttpContent-does-not-contain-a-definition-for-ReadAsAsync-and-no-extension-method/76379c9f26c8411cada4a15100d13339#76379c9f26c8411cada4a15100d13339</link>
		<pubDate>Fri, 25 Jan 2013 12:41:40 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/SystemNetHttpHttpContent-does-not-contain-a-definition-for-ReadAsAsync-and-no-extension-method/76379c9f26c8411cada4a15100d13339#76379c9f26c8411cada4a15100d13339</guid>
		<dc:creator>Sathyaish Chakravarthy</dc:creator>
		<slash:comments>2</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sathyaish Chakravarthy/Discussions/RSS</wfw:commentRss>
	</item>
	<item>
		<title>Coffeehouse - &#39;System.Net.Http.HttpContent&#39; does not contain a definition for &#39;ReadAsAsync&#39; and no extension method</title>
		<description><![CDATA[<p>After a long struggle, I found the solution.<br><br><strong>Solution:</strong> Add a reference to System.Net.Http.Formatting.dll. This assembly is also available in the <strong>C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies</strong> folder.<br><br>The method ReadAsAsync is an extention method declared in the class HttpContentExtensions, which is in the namespace System.Net.Http in the library System.Net.Http.Formatting.<br><br>Reflector came to rescue!</p>]]></description>
		<link>http://channel9.msdn.com/Forums/Coffeehouse/SystemNetHttpHttpContent-does-not-contain-a-definition-for-ReadAsAsync-and-no-extension-method/010415baf4d7456a82e6a15100d4929c#010415baf4d7456a82e6a15100d4929c</link>
		<pubDate>Fri, 25 Jan 2013 12:53:57 GMT</pubDate>
		<guid isPermaLink="false">http://channel9.msdn.com/Forums/Coffeehouse/SystemNetHttpHttpContent-does-not-contain-a-definition-for-ReadAsAsync-and-no-extension-method/010415baf4d7456a82e6a15100d4929c#010415baf4d7456a82e6a15100d4929c</guid>
		<dc:creator>Sathyaish Chakravarthy</dc:creator>
		<slash:comments>2</slash:comments>
		<wfw:commentRss>http://channel9.msdn.com/Niners/Sathyaish Chakravarthy/Discussions/RSS</wfw:commentRss>
	</item>
</channel>
</rss>