I wrote simple console application.
static void Main(string[] args)
{
new HttpClient().PostAsJsonAsync("URL", "Text");
}
And added System.Net.Http
and System.Net.Http.Formatting
referenes to project.
I get this exception:
An unhandled exception of type 'System.IO.FileLoadException' occurred in System.Net.Http.Formatting.dll
Additional information: Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)