I am doing the first of my asp.net projects, and we have settled on using asp.net core v. 2.0 - now that ms has released it. - we are using .NET 4.6 in our backed projects. but I am having some problems with using Newtonsoft.json, that apparently doesn't support the .netstandard 2.0 in the version 10.0.1 that I've installed. And for some unknown reason it will not install v.10.0.3, - I get this:
Error NU1202 Package Newtonsoft.Json 10.0.1 is not compatible with net461 (.NETFramework,Version=v4.6.1) / win7-x64. Package Newtonsoft.Json 10.0.1 supports:
- net20 (.NETFramework,Version=v2.0)
- net35 (.NETFramework,Version=v3.5)
- net40 (.NETFramework,Version=v4.0)
- net45 (.NETFramework,Version=v4.5)
- netstandard1.0 (.NETStandard,Version=v1.0)
- netstandard1.3 (.NETStandard,Version=v1.3)
- portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) ScannerWebRemoteControl
any ideas anyone?
Json library is included in the runtime for . NET Core 3.1 and later versions. For other target frameworks, install the System.
Json.net is made by newtonsoft.
Newtonsoft. Json uses reflection to get constructor parameters and then tries to find closest match by name of these constructor parameters to object's properties. It also checks type of property and parameters to match. If there is no match found, then default value will be passed to this parameterized constructor.
Open Integrated Terminal and run code given below
dotnet add package Newtonsoft.Json
It will download and add Newtonsoft.Json to the project (Latest version).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With