- 
                Notifications
    You must be signed in to change notification settings 
- Fork 391
use .NET 8.0 target framework for coverlet.core and remove Newtonsoft.Json #1733
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
78c4071    to
    b62cff1      
    Compare
  
    b62cff1    to
    ee6d285      
    Compare
  
    ee6d285    to
    cef7021      
    Compare
  
    d676f33    to
    9a478f5      
    Compare
  
    0696828    to
    627840f      
    Compare
  
    ….Json - Updated project files to target .NET 8.0 instead of .NET 6.0 across various projects. - Replaced Newtonsoft.Json with System.Text.Json in Coverage.cs and related files for improved performance and reduced dependencies. - Enhanced JSON serialization in tests and reporters to utilize System.Text.Json. - Updated integration tests to reflect changes in target frameworks and SDK versions. - Adjusted test projects to ensure compatibility with the new SDK version and updated dependencies. - Modified coverlet.collector.targets to support .NET SDK version 8.0.100.
627840f    to
    51e915b      
    Compare
  
    There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the minimum requirement for .NET SDK and runtime to .NET 8.0 and replaces Newtonsoft.Json with System.Text.Json throughout the codebase. The changes modernize the project to leverage .NET 8.0 features and the built-in JSON serialization.
Key changes include:
- Updating target frameworks from .NET 6.0 to .NET 8.0 across test and example projects
- Replacing Newtonsoft.Json with System.Text.Json in core components and package references
- Updating minimum SDK version requirements and documentation to reflect .NET 8.0 LTS support
Reviewed Changes
Copilot reviewed 45 out of 47 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description | 
|---|---|
| src/coverlet.core/coverlet.core.csproj | Multi-targets to include net8.0, removes Newtonsoft.Json dependency | 
| src/coverlet.core/Reporters/JsonReporter.cs | Migrates from Newtonsoft.Json to System.Text.Json serialization | 
| src/coverlet.core/Instrumentation/CecilAssemblyResolver.cs | Updates JSON parsing from JObject to JsonDocument | 
| src/coverlet.core/Coverage.cs | Replaces Newtonsoft.Json with System.Text.Json for deserialization | 
| test/coverlet.tests.utils/TestUtils.cs | Adds support for .NET 9.0 and 10.0 target frameworks | 
| test/coverlet.integration.tests/Msbuild.cs | Updates test framework targets and fixes multi-framework test logic | 
| Documentation/ | Updates all documentation to reflect .NET 8.0 requirements | 
| global.json | Updates SDK version to 8.0.413 | 
Comments suppressed due to low confidence (1)
test/coverlet.integration.tests/Msbuild.cs:1
- The variable name 'runtimeoptionselement' is inconsistent with the naming convention used elsewhere. It should be 'runtimeOptionsElement' to match the camelCase pattern used for other similar variables in the same method.
// Copyright (c) Toni Solarin-Sodara
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
related: #1713, #1762