Skip to content

Conversation

@armando-rodriguez-cko
Copy link
Contributor

Compatibility with .NET 4.5 using Newtonsoft.Json 12.0.3 and retain 13.0.3 for newer frameworks

Key Changes

This PR updates the .csproj file to ensure proper compatibility across all target frameworks by conditionally referencing different versions of Newtonsoft.Json:

  • Newtonsoft.Json 12.0.3 for .NET 4.5 (as newer versions dropped support).
  • Newtonsoft.Json 13.0.3 for .NET 5, .NET 6, and .NET Standard 2.0.

Changes

  • Added a conditional to use 12.0.3 only for .NET 4.5.
  • Ensured that all other frameworks continue to use Newtonsoft.Json 13.0.3.

Why this change?

  • Newtonsoft.Json 13.0.3 is not compatible with .NET 4.5, causing potential build issues.
  • This change ensures legacy support for .NET 4.5 while keeping latest features for modern frameworks.

Impact

  • No breaking changes for .NET 5, .NET 6, or .NET Standard 2.0 users.
  • .NET 4.5 applications can continue functioning with Newtonsoft.Json 12.0.3.

Testing

  • Built and validated the project for all target frameworks.
  • Verified .NET 4.5 builds correctly using Newtonsoft.Json 12.0.3.
  • Checked that .NET 5, .NET 6, and .NET Standard 2.0 still use Newtonsoft.Json 13.0.3.

@armando-rodriguez-cko armando-rodriguez-cko marked this pull request as ready for review March 14, 2025 11:28
@armando-rodriguez-cko armando-rodriguez-cko requested a review from a team March 14, 2025 11:29
@armando-rodriguez-cko armando-rodriguez-cko merged commit d247fe9 into master Mar 14, 2025
5 checks passed
@armando-rodriguez-cko armando-rodriguez-cko deleted the feature/459-high-severity-vulnerability-in-newtonsoftjson-901-reported-by-snyk branch March 14, 2025 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

High severity vulnerability in Newtonsoft.Json 9.0.1 reported by Snyk

3 participants