Can Newtonsoft.Json get updated to 11.x or 12.x?
See original GitHub issueThe package Microsoft.TestPlatform.TestHost
has a dependency on Newtonsoft.Json
, for target framework .NETCoreApp 2.1
it refers to version 9.0.1.
Would be possible to update the reference to at least version 11.x.
Why?
The package Newtonsoft.Json
in version 9.0.1 has no target framework for .NETCore >= 2 or .NETStandard >= 2. When restoring packages for the solution, the direct dependency to Microsoft.NET.Test.Sdk
causes indirect dependencies for several compatibility packages (e.g. System.Text.Encoding
). This is because the latest target framework of Newtonsoft.Json
is .NETStandard 1.0
.
When forcing Newtonsoft.Json
to version 11.0.2 in the project, the compatibility packages are not required and not restored.
We are using .net core 3.x and we want to limit the list of nuget packages in our internal package feed due to license review process. This is why we don’t want to have all the small compatibility packages in our feed.
Issue Analytics
- State:
- Created 4 years ago
- Comments:29 (24 by maintainers)
I quickly tried to replace the library and ran into many issues with projects still using netcoreapp1.0 I think we need to do a a major cleanup either way, because System.Text.Json does not support net451 and so on.
I need to clear up which versions we should be using and see what the impact is in either case.
@AArnott Upgraded it in https://github.com/microsoft/vstest/pull/3815 and asked our release team to publish a new public preview asap, so people can grab it and test it. We plan to lift the minimum supported tfms in 17.4 to net462 and netcoreapp3.1, and update other packages as well. And continue updating these packages, to use the oldest version that does not have security issue. Consuming projects should also update themselves.
Unfortunately there is no other way for us to do this (other than removing dependency on Newtonsoft.Json entirely), that would prevent us from upgrading the tested project in case they use older version of that nuget.