I’m fairly new to JSON development and just getting started is a major task with very little in the way of solutions via Google.
I can’t get anywhere without adding system.net.http as part of my project
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Net.Http;
objects like var, HttpWebClient, KeyValuePair throw up an error during compile. Here’s what I tried:
- Reinstalled .NET 4.0
- Reinstalled .NET 4.5
- Repackaged library via. NuGet
- Referenced system.net
No luck. I’ve even tried referencing the the class in web.config
<compilation targetFramework="4.5">
<assemblies>
<add assembly="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</assemblies>
</compilation>
and again in..
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" />
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
An error is thrown on “assemblies”
I’m at my wits end. What am I not referencing or doing wrong where System.Net.Http cannot be used.
The help system reveals that the System.Net.Http namespace is defined in System.Net.Http.dll which as you say is not listed. A quick search of my own filesystem reveals copies
On my system those paths are
System.Net.Http.WebRequest.dll is on the same paths.