We have a .NET 4 website project created using Visual Studio 2013 that references the System.Net.Http.dll file.
This is the line in the web.config file that loads the .dll:
<add assembly="System.Net.Http, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
The project builds great, but when we try to "Publish a website", it gives the following error:
The type or namespace name "Http" does not exist in the namespace 'System.Net (do you miss the assembly reference?)
It seems that the assembly can be loaded from the GAC, we tried to put the assembly in the application's BIN folder, but that doesnβt matter - it still appears as a GAC ββlink on the projectβs property pages.
We also tried to add:
<runtime> <assemblyBinding> <dependentAssembly> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> <codeBase version="1.0.0.0" href="/bin/System.Net.Http.dll"/> </dependentAssembly> </assemblyBinding>
As suggested here: Failed to load file or assembly System.Web.Http.WebHost after posting on Azure website
But that doesn't work either.
We changed the Target Framework to 3.5 and 4.5 with no effect.
We tried to publish several different machines.
EDIT: we tried to offer the nuget package in RobAda, and it did not get the desired effect, we still get errors.
Mack
source share