title: Why "Method not found: 'Void System.Web.Http.HttpResponseException..ctor" after package update?
body: <p>I have an ASP.NET MVC application which started to misbehave after the last NuGet package updates. The web app uses .NET Framework 4.6.1, and the developer machine is a Windows Server 2012 R2 Essentials. One package I use is Stripe.NET for payment processing. Its earlier versions required only <code>&lt;package id="System.Net.Http" version="4.0.0" targetFramework="net461" /&gt;</code>. Visual Studio marked that there's a newer version of that (at that time it was <code>4.3.0</code>), but when I updated that it pulled in a ton of packages. So I simply reverted back that dependency to <code>4.0.0</code>, Stripe didn't require newer.</p>
  
  <p>Then lately I introduced <code>Nager.Date</code> to handle work days and holidays. The latest update (v <code>1.5.0</code>) of that package requires <code>"NETStandard.Library" version="1.6.1"</code>. Just like upgrading <code>System.Net.Http</code> to <code>4.3.0</code>, upgrading to that <code>Nager.Date</code> pulls in the ton of packages I mention. In summary: sooner or later I have to cave in and update.</p>
  
  <p>The pulled-in packages:</p>
  
  <pre><code>&lt;package id="Microsoft.NETCore.Platforms" version="1.1.0" targetFramework="net461" /&gt;
  &lt;package id="Microsoft.Win32.Primitives" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.AppContext" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Collections" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Collections.Concurrent" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Console" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Diagnostics.DiagnosticSource" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Diagnostics.Tools" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Diagnostics.Tracing" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Globalization" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Globalization.Calendars" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.IO" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.IO.Compression" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.IO.Compression.ZipFile" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.IO.FileSystem" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.IO.FileSystem.Primitives" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Linq" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Net.Http" version="4.3.1" targetFramework="net461" /&gt;
  &lt;package id="System.Net.Primitives" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Net.Sockets" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.ObjectModel" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Reflection" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Reflection.Primitives" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Resources.ResourceManager" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Runtime" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Runtime.Handles" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Runtime.InteropServices" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Runtime.Numerics" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Text.Encoding" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Text.Encoding.Extensions" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Text.RegularExpressions" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Threading" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Threading.Tasks" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Threading.Timer" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Xml.ReaderWriter" version="4.3.0" targetFramework="net461" /&gt;
  &lt;package id="System.Xml.XDocument" version="4.3.0" targetFramework="net461" /&gt;
  </code></pre>
  
  <p>I would still be in peace with all of this if in the end I won't be presented with:</p>
  
  <pre><code>Exception thrown: 'System.MissingMethodException' in ThruThink.dll
  Additional information: Method not found: 'Void System.Web.Http.HttpResponseException..ctor(System.Net.Http.HttpResponseMessage)'.
  </code></pre>
  
  <p>I couldn't figure out why this happened. Nager.Date owner gave me an idea: he generated the latest package with VS 2017, so I installed that hoping that it'll install some assemblies which will magically solve this exception. But that didn't happen so far.</p>
  
  <p>I don't understand the list of these packages. A lot of them are foundational libraries which supposed to be part of the CLR itself (like System.IO, System.Console, ...) and available without a NuGet package. Maybe one clue is that I see <code>Microsoft.NETCore.Platforms</code>, although I'm with .NET 4.6.1, not using .NET Core. I haven't played with .NET Core too much yet, but those packages make sense for .NET Core infrastructure. What's going on?</p>
  
  <hr>
  
  <p>The newest version of <code>Nager.Date</code> didn't pull in all of those dependencies and I don't face this problem any more.</p>