question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can Newtonsoft.Json get updated to 11.x or 12.x?

See original GitHub issue

The 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:closed
  • Created 4 years ago
  • Comments:29 (24 by maintainers)

github_iconTop GitHub Comments

2reactions
nohwndcommented, Feb 4, 2020

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.

1reaction
nohwndcommented, Jun 30, 2022

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Updating the version of Newtonsoft.json - Progress Community
This article provides information for addressing the use-case of updating the version of Newtonsoft.json NuGet package.
Read more >
Second Level of JSON String after upgrade the package ...
Yes, and I'm telling you that Newtonsoft.json 12 is not compatible with Studio, Robot and System 20.10 and Web 1.6.0. I'm also asking...
Read more >
Newtonsoft.json assembly package version mismatch
Make sure that the deployed application is actually getting the correct version from NuGet and not just the latest and greatest. Or update...
Read more >
Migrate from Newtonsoft.Json to System.Text.Json - .NET
This article shows how to migrate from Newtonsoft.Json to ... Json does case-insensitive property name matching by default. The System.Text.
Read more >
Version Conflict despite AutoUnify being set to true
Hi all, We have a project with a dependency on NewtonSoft.json version 12.0.3, to which we are adding as dependency, another project which ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found