Adding Newtonsoft.Json to a fresh UWP project causes dependency warnings:
runtime.native.System.IO.Compression 4.1.0 depends on runtime.win10-arm64.runtime.native.System.IO.Compression (>= 4.3.0) but runtime.win10-arm64.runtime.native.System.IO.Compression 4.3.0 was not found. An approximate best match of runtime.win10-arm64.runtime.native.System.IO.Compression 4.3.1 was resolved.
and
runtime.native.System.IO.Compression 4.3.0 depends on runtime.win10-arm64.runtime.native.System.IO.Compression (>= 4.3.0) but runtime.win10-arm64.runtime.native.System.IO.Compression 4.3.0 was not found. An approximate best match of runtime.win10-arm64.runtime.native.System.IO.Compression 4.3.1 was resolved.
Not sure I understand why and how Newtonsoft.Json depends on two versions of the same library. Maybe some transitive deps are running wild?
Newtonsoft.Json 11 has a netstandard2.0 target. If you setup your UWP project to be able to use netstandard2.0 targets then either you shouldn't get any warnings about different package version.
If you do get warnings then it is a bug in UWP and you'll need to raise an issue with the UWP team.
Targeting netstandard2.0 is impossible because W10 mobile does not support anything beyond 1.4.
@JamesNK could you reopen this? As I said, there is no way for uwp devs to target netstandard2.0 if they want to ship their app to w10 mobile.
You'll have to live with warnings.
This is a .net library, not for UWP.
The problem is in UWP apps targeting MinVersion 10.0.15063 or older SDK version. Netstandard2.0 is only supported in UWP apps with MinVersion 10.0.16299 or newer.
For some reason starting with Newtonsoft.Json 10 Visual Studio/Nuget uses the ".NETStandard1.3" package in those apps instead of the previously used "portable-net45+wp80+win8+wpa81" package.
The .NETStandard1.3 target loads lots of Nuget dependencies from the NETStandard.Library 1.6.1 Nuget - this Nuget is completely unnecessary in UWP apps with MinVersion 10.0.15063 or older, see my previous issue #1291.
It might be a good idea to add new target ".NETCore5.0" to Newtonsoft.Json for UWP apps targeting older SDKs, without need to load full NETStandard.Library 1.6.1.
See here the Framework Precedence for UWP apps.
Most helpful comment
The problem is in UWP apps targeting MinVersion 10.0.15063 or older SDK version. Netstandard2.0 is only supported in UWP apps with MinVersion 10.0.16299 or newer.
For some reason starting with Newtonsoft.Json 10 Visual Studio/Nuget uses the ".NETStandard1.3" package in those apps instead of the previously used "portable-net45+wp80+win8+wpa81" package.
The .NETStandard1.3 target loads lots of Nuget dependencies from the NETStandard.Library 1.6.1 Nuget - this Nuget is completely unnecessary in UWP apps with MinVersion 10.0.15063 or older, see my previous issue #1291.
It might be a good idea to add new target ".NETCore5.0" to Newtonsoft.Json for UWP apps targeting older SDKs, without need to load full NETStandard.Library 1.6.1.
See here the Framework Precedence for UWP apps.