title: Unable to fix error "Could not load System.Net.Http, Version=4.2.0.0"
body: <p>On my production server I get the error: </p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>On my local machine it works fine, but on the server it throws the above error, so there must be a missing file somewhere. See update 3 where I tried adding the missing dll, which then throws a different error.</p>
  
  <p>I followed instructions in these links:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/47570912/strange-issue-with-system-net-http-4-2-0-0-not-found">Strange issue with System.Net.Http 4.2.0.0 not found</a></li>
  <li><a href="https://github.com/Azure/diagnostics-eventflow/issues/155" rel="nofollow noreferrer">https://github.com/Azure/diagnostics-eventflow/issues/155</a></li>
  <li><a href="https://github.com/dotnet/standard/issues/891" rel="nofollow noreferrer">https://github.com/dotnet/standard/issues/891</a></li>
  </ul>
  
  <p>As also stated in the last link, I' in the same scenario where I don't yet want to migrate (<a href="https://docs.microsoft.com/en-us/nuget/consume-packages/migrate-packages-config-to-package-reference" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/nuget/consume-packages/migrate-packages-config-to-package-reference</a>), as I don't want to run into incompatibilities, I first want to fix the current issue.</p>
  
  <p>I already looked for all references of <code>System.Net.Http</code> (and a few others) and manually changed version numbers, this is the old codeblock in my .vbproj file:</p>
  
  <pre><code>&lt;Reference Include="System.Net.Http, Version=4.1.1.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
    &lt;HintPath&gt;packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll&lt;/HintPath&gt;
    &lt;Private&gt;True&lt;/Private&gt;
    &lt;Private&gt;True&lt;/Private&gt;
  &lt;/Reference&gt;
  &lt;Reference Include="System.Runtime, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
    &lt;HintPath&gt;packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll&lt;/HintPath&gt;
    &lt;Private&gt;True&lt;/Private&gt;
    &lt;Private&gt;True&lt;/Private&gt;
  &lt;/Reference&gt;
  &lt;Reference Include="System.Runtime.Serialization" /&gt;
  &lt;Reference Include="System.Security.Cryptography.Algorithms, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
    &lt;HintPath&gt;packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll&lt;/HintPath&gt;
    &lt;Private&gt;True&lt;/Private&gt;
    &lt;Private&gt;True&lt;/Private&gt;
  &lt;/Reference&gt;
  &lt;Reference Include="System.Security.Cryptography.Encoding, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
    &lt;HintPath&gt;packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll&lt;/HintPath&gt;
    &lt;Private&gt;True&lt;/Private&gt;
    &lt;Private&gt;True&lt;/Private&gt;
  &lt;/Reference&gt;
  &lt;Reference Include="System.Security.Cryptography.Primitives, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
    &lt;HintPath&gt;packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll&lt;/HintPath&gt;
    &lt;Private&gt;True&lt;/Private&gt;
    &lt;Private&gt;True&lt;/Private&gt;
  &lt;/Reference&gt;
  &lt;Reference Include="System.Security.Cryptography.X509Certificates, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
    &lt;HintPath&gt;packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll&lt;/HintPath&gt;
    &lt;Private&gt;True&lt;/Private&gt;
    &lt;Private&gt;True&lt;/Private&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <p>Here's my latest <code>.vbproj</code> file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"&gt;
    &lt;Import Project="packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" /&gt;
    &lt;Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /&gt;
    &lt;PropertyGroup&gt;
      &lt;Configuration Condition=" '$(Configuration)' == '' "&gt;Debug&lt;/Configuration&gt;
      &lt;Platform Condition=" '$(Platform)' == '' "&gt;AnyCPU&lt;/Platform&gt;
      &lt;ProductVersion&gt;
      &lt;/ProductVersion&gt;
      &lt;SchemaVersion&gt;2.0&lt;/SchemaVersion&gt;
      &lt;ProjectGuid&gt;{6455BF17-B42E-4854-96B1-D4D0E7767B0C}&lt;/ProjectGuid&gt;
      &lt;ProjectTypeGuids&gt;{349c5851-65df-11da-9384-00065b846f21};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}&lt;/ProjectTypeGuids&gt;
      &lt;OutputType&gt;Library&lt;/OutputType&gt;
      &lt;RootNamespace&gt;MyProject&lt;/RootNamespace&gt;
      &lt;AssemblyName&gt;MyProject&lt;/AssemblyName&gt;
      &lt;TargetFrameworkVersion&gt;v4.7.2&lt;/TargetFrameworkVersion&gt;
      &lt;OptionExplicit&gt;On&lt;/OptionExplicit&gt;
      &lt;OptionCompare&gt;Binary&lt;/OptionCompare&gt;
      &lt;OptionStrict&gt;Off&lt;/OptionStrict&gt;
      &lt;OptionInfer&gt;On&lt;/OptionInfer&gt;
      &lt;MvcBuildViews&gt;false&lt;/MvcBuildViews&gt;
      &lt;UseIISExpress&gt;true&lt;/UseIISExpress&gt;
      &lt;Use64BitIISExpress /&gt;
      &lt;IISExpressSSLPort&gt;44316&lt;/IISExpressSSLPort&gt;
      &lt;IISExpressAnonymousAuthentication /&gt;
      &lt;IISExpressWindowsAuthentication /&gt;
      &lt;IISExpressUseClassicPipelineMode /&gt;
      &lt;UseGlobalApplicationHostFile /&gt;
      &lt;NuGetPackageImportStamp&gt;
      &lt;/NuGetPackageImportStamp&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "&gt;
      &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt;
      &lt;DebugType&gt;full&lt;/DebugType&gt;
      &lt;DefineDebug&gt;true&lt;/DefineDebug&gt;
      &lt;DefineTrace&gt;true&lt;/DefineTrace&gt;
      &lt;OutputPath&gt;bin\&lt;/OutputPath&gt;
      &lt;DocumentationFile&gt;MyProject.xml&lt;/DocumentationFile&gt;
      &lt;NoWarn&gt;42016,41999,42017,42018,42019,42032,42036,42020,42021,42022&lt;/NoWarn&gt;
    &lt;/PropertyGroup&gt;
    &lt;PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "&gt;
      &lt;DebugSymbols&gt;true&lt;/DebugSymbols&gt;
      &lt;DebugType&gt;pdbonly&lt;/DebugType&gt;
      &lt;DefineDebug&gt;false&lt;/DefineDebug&gt;
      &lt;DefineTrace&gt;true&lt;/DefineTrace&gt;
      &lt;Optimize&gt;true&lt;/Optimize&gt;
      &lt;OutputPath&gt;bin\&lt;/OutputPath&gt;
      &lt;DocumentationFile&gt;MyProject.xml&lt;/DocumentationFile&gt;
      &lt;NoWarn&gt;42016,41999,42017,42018,42019,42032,42036,42020,42021,42022&lt;/NoWarn&gt;
    &lt;/PropertyGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Reference Include="AjaxControlToolkit, Version=16.1.1.0, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\AjaxControlToolkit.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="aspnetforum, Version=7.2.7.0, Culture=neutral, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\aspnetforum.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="Hammock, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c148cfba29ed1a4d, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\Hammock.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="Hammock.ClientProfile, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c148cfba29ed1a4d, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\Hammock.ClientProfile.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="HtmlAgilityPack, Version=1.7.1.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\HtmlAgilityPack.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="Microsoft.AspNet.FriendlyUrls, Version=1.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\Microsoft.AspNet.FriendlyUrls.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="Mollie, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\Mollie.Net.2.0.2\lib\netstandard2.0\Mollie.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="Mollie.Api, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\Mollie.Api.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="MySql.Data, Version=6.6.5.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\MySql.Data.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="PresentationCore" /&gt;
      &lt;Reference Include="PresentationFramework" /&gt;
      &lt;Reference Include="skmValidators, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\skmValidators.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System" /&gt;
      &lt;Reference Include="System.ComponentModel.Composition" /&gt;
      &lt;Reference Include="System.Data" /&gt;
      &lt;Reference Include="System.Drawing" /&gt;
      &lt;Reference Include="System.IO, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\System.IO.4.3.0\lib\net462\System.IO.dll&lt;/HintPath&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;Private&gt;True&lt;/Private&gt;
      &lt;/Reference&gt;
  
      &lt;Reference Include="System.Net.Http, Version=4.3.4, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\System.Net.Http.4.3.4\lib\net46\System.Net.Http.dll&lt;/HintPath&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;Private&gt;True&lt;/Private&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Runtime, Version=4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\System.Runtime.4.3.0\lib\net462\System.Runtime.dll&lt;/HintPath&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;Private&gt;True&lt;/Private&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Runtime.Serialization" /&gt;
      &lt;Reference Include="System.Security.Cryptography.Algorithms, Version=4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\System.Security.Cryptography.Algorithms.4.3.0\lib\net463\System.Security.Cryptography.Algorithms.dll&lt;/HintPath&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;Private&gt;True&lt;/Private&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Security.Cryptography.Encoding, Version=4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\System.Security.Cryptography.Encoding.4.3.0\lib\net46\System.Security.Cryptography.Encoding.dll&lt;/HintPath&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;Private&gt;True&lt;/Private&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Security.Cryptography.Primitives, Version=4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\System.Security.Cryptography.Primitives.4.3.0\lib\net46\System.Security.Cryptography.Primitives.dll&lt;/HintPath&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;Private&gt;True&lt;/Private&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Security.Cryptography.X509Certificates, Version=4.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"&gt;
        &lt;HintPath&gt;packages\System.Security.Cryptography.X509Certificates.4.3.0\lib\net461\System.Security.Cryptography.X509Certificates.dll&lt;/HintPath&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;Private&gt;True&lt;/Private&gt;
      &lt;/Reference&gt;
  
      &lt;Reference Include="System.Core" /&gt;
      &lt;Reference Include="System.Web" /&gt;
      &lt;Reference Include="System.Web.Services" /&gt;
      &lt;Reference Include="System.EnterpriseServices" /&gt;
      &lt;Reference Include="System.Net.Http.WebRequest"&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.Helpers.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.Mvc.5.2.7\lib\net45\System.Web.Mvc.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.Optimization"&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.Razor.3.2.7\lib\net45\System.Web.Razor.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Deployment.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.WebPages.3.2.7\lib\net45\System.Web.WebPages.Razor.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="TweetSharp, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c148cfba29ed1a4d, processorArchitecture=MSIL"&gt;
        &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
        &lt;HintPath&gt;bin\TweetSharp.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="WebGrease"&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;HintPath&gt;packages\WebGrease.1.6.0\lib\WebGrease.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="Antlr3.Runtime"&gt;
        &lt;Private&gt;True&lt;/Private&gt;
        &lt;HintPath&gt;packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="WindowsBase" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Reference Include="Newtonsoft.Json"&gt;
        &lt;HintPath&gt;packages\Newtonsoft.Json.11.0.1\lib\net45\Newtonsoft.Json.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Net.Http.Formatting"&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.WebApi.Client.5.2.7\lib\net45\System.Net.Http.Formatting.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.Http"&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.WebApi.Core.5.2.7\lib\net45\System.Web.Http.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="System.Web.Http.WebHost"&gt;
        &lt;HintPath&gt;packages\Microsoft.AspNet.WebApi.WebHost.5.2.7\lib\net45\System.Web.Http.WebHost.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
      &lt;Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform"&gt;
        &lt;HintPath&gt;packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll&lt;/HintPath&gt;
      &lt;/Reference&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Import Include="System" /&gt;
      &lt;Import Include="System.Collections" /&gt;
      &lt;Import Include="System.Collections.Generic" /&gt;
      &lt;Import Include="System.Data" /&gt;
      &lt;Import Include="System.Linq" /&gt;
      &lt;Import Include="System.Xml.Linq" /&gt;
      &lt;Import Include="System.Diagnostics" /&gt;
      &lt;Import Include="System.Collections.Specialized" /&gt;
      &lt;Import Include="System.Configuration" /&gt;
      &lt;Import Include="System.Text" /&gt;
      &lt;Import Include="System.Text.RegularExpressions" /&gt;
      &lt;Import Include="System.Web" /&gt;
      &lt;Import Include="System.Web.Caching" /&gt;
      &lt;Import Include="System.Web.Mvc" /&gt;
      &lt;Import Include="System.Web.Mvc.Ajax" /&gt;
      &lt;Import Include="System.Web.Mvc.Html" /&gt;
      &lt;Import Include="System.Web.Routing" /&gt;
      &lt;Import Include="System.Web.SessionState" /&gt;
      &lt;Import Include="System.Web.Security" /&gt;
      &lt;Import Include="System.Web.Profile" /&gt;
      &lt;Import Include="System.Web.UI" /&gt;
      &lt;Import Include="System.Web.UI.WebControls" /&gt;
      &lt;Import Include="System.Web.UI.WebControls.WebParts" /&gt;
      &lt;Import Include="System.Web.UI.HtmlControls" /&gt;
    &lt;/ItemGroup&gt;
    &lt;ItemGroup&gt;
      &lt;Folder Include="App_Data\" /&gt;
      &lt;Folder Include="App_WebReferences\" /&gt;
      &lt;Folder Include="Models\" /&gt;
    &lt;/ItemGroup&gt;
    &lt;PropertyGroup&gt;
      &lt;VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''"&gt;10.0&lt;/VisualStudioVersion&gt;
      &lt;VSToolsPath Condition="'$(VSToolsPath)' == ''"&gt;$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)&lt;/VSToolsPath&gt;
    &lt;/PropertyGroup&gt;
    &lt;Import Project="$(MSBuildBinPath)\Microsoft.VisualBasic.targets" /&gt;
    &lt;Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /&gt;
    &lt;Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /&gt;
    &lt;Target Name="MvcBuildViews" AfterTargets="AfterBuild" Condition="'$(MvcBuildViews)'=='true'"&gt;
      &lt;AspNetCompiler VirtualPath="temp" PhysicalPath="$(WebProjectOutputDir)" /&gt;
    &lt;/Target&gt;
    &lt;Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"&gt;
      &lt;PropertyGroup&gt;
        &lt;ErrorText&gt;This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.&lt;/ErrorText&gt;
      &lt;/PropertyGroup&gt;
      &lt;Error Condition="!Exists('packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.0\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" /&gt;
    &lt;/Target&gt;
    &lt;!-- To modify your build process, add your task inside one of the targets below and uncomment it.
         Other similar extension points exist, see Microsoft.Common.targets.
    &lt;Target Name="BeforeBuild"&gt;
    &lt;/Target&gt;
    &lt;Target Name="AfterBuild"&gt;
    &lt;/Target&gt; --&gt;
  &lt;/Project&gt;
  </code></pre>
  
  <p>My packages.config</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;packages&gt;
    &lt;package id="Antlr" version="3.5.0.2" targetFramework="net472" /&gt;
    &lt;package id="bootstrap" version="3.4.1" targetFramework="net472" /&gt;
    &lt;package id="jQuery" version="3.3.1" targetFramework="net472" /&gt;
    &lt;package id="jQuery.Validation" version="1.17.0" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.AspNet.Mvc" version="5.2.7" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi" version="5.2.7" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.AspNet.WebPages" version="3.2.7" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="2.0.0" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.11" targetFramework="net472" /&gt;
    &lt;package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net472" /&gt;
    &lt;package id="Modernizr" version="2.8.3" targetFramework="net472" /&gt;
    &lt;package id="Mollie.Net" version="2.0.2" targetFramework="net472" /&gt;
    &lt;package id="Newtonsoft.Json" version="12.0.2" targetFramework="net472" /&gt;
    &lt;package id="System.IO" version="4.3.0" targetFramework="net472" /&gt;
    &lt;package id="System.Net.Http" version="4.3.4" targetFramework="net472" /&gt;
    &lt;package id="System.Runtime" version="4.3.0" targetFramework="net472" /&gt;
    &lt;package id="System.Security.Cryptography.Algorithms" version="4.3.0" targetFramework="net472" /&gt;
    &lt;package id="System.Security.Cryptography.Encoding" version="4.3.0" targetFramework="net472" /&gt;
    &lt;package id="System.Security.Cryptography.Primitives" version="4.3.0" targetFramework="net472" /&gt;
    &lt;package id="System.Security.Cryptography.X509Certificates" version="4.3.0" targetFramework="net472" /&gt;
    &lt;package id="WebGrease" version="1.6.0" targetFramework="net472" /&gt;
  &lt;/packages&gt;
  </code></pre>
  
  <p>I also commented out the entire <code>&lt;runtime&gt;</code> section in my web.config (containing the assemblyBindings).</p>
  
  <p>Still, the error persists, what else can I do?</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>Based on @welotty's answer I did the following:</p>
  
  <p>I run <code>fuslogvw</code> from the VS2019 Developer Command Prompt, but I just see and empty window (no applications):</p>
  
  <p><a href="https://i.stack.imgur.com/Gq3Gy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Gq3Gy.png" alt="enter image description here"></a></p>
  
  <p>I can't see where I can select a directory to analyze or any other settings for my specific app.</p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>Based on @welotty's comment I got <code>fuslogvw</code> to run. I cleared all messages, build my app in Visual Studio 2019 and now see this (no mention of <code>System.Net.Http</code>):</p>
  
  <p><a href="https://i.stack.imgur.com/apdTP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/apdTP.png" alt="enter image description here"></a></p>
  
  <p>I opened up <code>System.IO</code> log, and I get this below in the log, but als no mention of <code>System.Net.Http</code>)</p>
  
  <pre><code>*** Assembly Binder Log Entry  (24-Aug-2019 @ 4:47:53 PM) ***
  
  The operation failed.
  Bind result: hr = 0x80070002. The system cannot find the file specified.
  
  Assembly manager loaded from:  C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll
  Running under executable  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
  --- A detailed error log follows. 
  
  === Pre-bind state information ===
  LOG: DisplayName = System.IO
   (Partial)
  WRN: Partial binding information was supplied for an assembly:
  WRN: Assembly Name: System.IO | Domain ID: 1
  WRN: A partial bind occurs when only part of the assembly display name is provided.
  WRN: This might result in the binder loading an incorrect assembly.
  WRN: It is recommended to provide a fully specified textual identity for the assembly,
  WRN: that consists of the simple name, version, culture, and public key token.
  WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
  LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/
  LOG: Initial PrivatePath = NULL
  LOG: Dynamic Base = NULL
  LOG: Cache Base = NULL
  LOG: AppName = MSBuild.exe
  Calling assembly : Microsoft.Build.Tasks.Core, Version=15.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
  ===
  LOG: This bind starts in default load context.
  LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe.Config
  LOG: Using host configuration file: 
  LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
  LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
  LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/System.IO.DLL.
  LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/System.IO/System.IO.DLL.
  LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/System.IO.EXE.
  LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/MSBuild/Current/Bin/System.IO/System.IO.EXE.
  LOG: All probing URLs attempted and failed.
  
  *** Assembly Binder Log Entry  (24-Aug-2019 @ 4:47:53 PM) ***
  
  The operation failed.
  Bind result: hr = 0x80070002. The system cannot find the file specified.
  </code></pre>
  
  <p>First of all: how would I resolve these issues? The log states <code>The system cannot find the file specified</code> and secondly: I think this is not related to my actual issue?</p>
  
  <p><strong>UPDATE 3</strong></p>
  
  <p>I noticed that <code>System.Net.Http.dll</code> was actually missing from the <code>bin</code> folder on my production server.
  So I copied the dll from my local machine. However, then I get the error:</p>
  
  <blockquote>
    <p>Cannot load a reference assembly for execution.</p>
  </blockquote>
  
  <p>I checked <a href="https://stackoverflow.com/questions/48709542/cannot-load-a-reference-assembly-for-execution">here</a>, but that seems awful complex for something as simple as adding a new dll to a bin folder. 
  And not sure if it matters, but my prod server does not have the folder: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.7.2.</p>
  
  <p>Why am I getting this error?</p>
  
  <p><a href="https://i.stack.imgur.com/pfNVW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pfNVW.png" alt="enter image description here"></a></p>