title: How should I reference HttpClient for dnx451 and dnxcore50?
body: <p>How should I reference <code>HttpClient</code> using a <code>project.json</code> file?<br>
  I want both frameworks to work: <code>dnx451</code> and <code>dnxcore50</code>.</p>
  
  <p>Here is my current attempt at the <code>project.json</code> file. (I've removed the irrelevant parts.)</p>
  
  <pre><code>{
    "dependencies": {
      "Microsoft.Net.Http": "2.2.29",
      "Microsoft.Net.Http.Headers": "1.0.0-beta4",
      "System.Net.Http": "4.0.0-beta-22816"
    },
    "frameworks": {
      "dnx451": {
        "frameworkAssemblies": {
          "System.Net.Http": "4.0.0.0"
        }
      },
      "dnxcore50": { }
    }
  }
  </code></pre>
  
  <p>Discovering the dependencies I do have listed was a trial-and-error procedure.</p>
  
  <p>With this <code>project.json</code> file, the <code>dnxcore50</code> context properly resolves all the classes in this example block of code, but it fails to resolve <code>HttpRequestMessage</code>, <code>HttpMethod</code>, and <code>MediaTypeWithQualityHeaderValue</code> with the <code>dnx451</code> context:</p>
  
  <pre><code>var request = new HttpRequestMessage(HttpMethod.Get, "...");
  request.Headers.Accept.Clear();
  request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/..."));
  var response = await client.SendAsync(request);
  var model = await response.EnsureSuccessStatusCode().Content.ReadAsAsync&lt;SomeModel&gt;();
  </code></pre>