the nuget package System.Net.Http.Formatting was deprecated and removed from nuget for security issues. It should not be used. a replacement is:
Microsoft.AspNet.WebApi.Client
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello,
System.Net.Http.Formatting
Newtonsoft.Json.dll
NuGet\Install-Package Newtonsoft.Json -Version 6.0.1
https://www.nuget.org/packages/Newtonsoft.Json/
Messages
//Could not load file or assembly 'Newtonsoft.Json, Version=6.0.0.0'
//A dependency on it was not found. The found manifest definition of the assembly does not match the assembly reference.
//System.IO.FileLoadException: Could not load file or assembly 'Newtonsoft.Json, Version=6.0.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)
//Could not load file or assembly 'Newtonsoft.Json, Version=12.0.0.0, Culture=neutral
// I needed for a REST interface.
response = client.PostAsJsonAsync(urlParameters, p).Result;
I use these two files. Updated on the version 12.0.0 at Newtonsoft.Json.dll
Now I get the error message. Where do I get the correct System.Net.Http.Formatting file?
I suspect this file uses the 6.0.0 and gives a version conflict.
Which tool can I use to see which dlls the current dll contains?
What is the best way to solve it? A Dll does not load a config file, isn't?
Thanks.
/////////// Please note I found this on the net. I use this in my own DLL. I have no App.Config, no Package Config. Or maybe is it possible inside a setting file? But how and who reads the values?
app.config
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.1" newVersion="12.0.1" />
</dependentAssembly
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="6.0.1" targetFramework="net472" />
<package id="System.Net.Http" version="2.0.20126.16343" targetFramework="net472" />
<package id="System.Net.Http.Formatting.Extension" version="5.2.3.0" targetFramework="net472" />
</packages>
the nuget package System.Net.Http.Formatting was deprecated and removed from nuget for security issues. It should not be used. a replacement is:
Microsoft.AspNet.WebApi.Client