title: Strange issue with System.Net.Http 4.2.0.0 not found
body: <p>I have a strange issue, which drives me crazy…</p>
  <p>I have a simple Class Library Project (Full .NET Framework, 4.6.1) with a wrapper class for functionality around Cosmos DB. Therefore I have added the “Microsoft.Azure.DocumentDB” NuGet Package 1.19.1 to this project. Other than that, I have a reference to the “Newtonsoft.Json” NuGet Package 10.0.3, as well as to a couple of &quot;Microsoft.Diagnostics.EventFlow.*&quot; NuGet Packages.</p>
  <p>So far, everything compiles without any error.</p>
  <p>But as soon as I hit my wrapper class – consumed from a simple Service Fabric Stateless Service (Full .NET Framework 4.6.1) – and try to execute the following line of code:</p>
  <pre><code>_docClient = new DocumentClient(new Uri(cosmosDbEndpointUrl), cosmosDbAuthKey);
  </code></pre>
  <p>I get this strange error at runtime:</p>
  <blockquote>
  <p>System.IO.FileNotFoundException occurred   HResult=0x80070002<br />
  Message=Could not load file or assembly 'System.Net.Http,
  Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or
  one of its dependencies. The system cannot find the file specified.<br />
  Source=   StackTrace:    at
  Microsoft.Azure.Documents.Client.DocumentClient.Initialize(Uri
  serviceEndpoint, ConnectionPolicy connectionPolicy, Nullable<code>1 desiredConsistencyLevel)    at Microsoft.Azure.Documents.Client.DocumentClient..ctor(Uri serviceEndpoint, String authKeyOrResourceToken, ConnectionPolicy connectionPolicy, Nullable</code>1 desiredConsistencyLevel)</p>
  <p>Inner Exception 1: FileNotFoundException: Could not load file or
  assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral,
  PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
  system cannot find the file specified.</p>
  </blockquote>
  <p>I have absolutely no clue, why the System.Net.Http assembly is not found at all – there is even a assembly reference in my class library project to the .Net Framework Assembly “System.Net.Http 4.0.0.0”.</p>
  <p>What I also do not understand is, that there is this weird binding redirect to 4.2.0.0 – where is that one coming from?
  To get around this one, I tried to add the following redirect to the app.config of the Service Fabric Service (which is consuming the class library):</p>
    
      
      
    
  <p>But still no difference, I still get the error at runtime.</p>
  <p>Anybody having a clue? Anybody having seen such issue?</p>