Skip to content

Conversation

Bertk
Copy link
Collaborator

@Bertk Bertk commented Jan 27, 2025

  • updates the minimum requirement for .NET SDK and runtime to .NET 8.0
  • replaces Newtonsoft.Json nuget packages with System.Text.Json which is shipped with .NET 8.0

related: #1713, #1762

@Bertk Bertk changed the title use .NET 8.0 assembies for coverlet.core and remove Newtonsoft.Json use .NET 8.0 assemblies for coverlet.core and remove Newtonsoft.Json Jan 27, 2025
@Bertk Bertk force-pushed the sdk-8.0.x-requirement branch 2 times, most recently from 78c4071 to b62cff1 Compare January 29, 2025 08:44
@Bertk Bertk force-pushed the sdk-8.0.x-requirement branch from b62cff1 to ee6d285 Compare March 29, 2025 11:39
@Bertk Bertk marked this pull request as ready for review March 29, 2025 11:58
@Bertk Bertk force-pushed the sdk-8.0.x-requirement branch from ee6d285 to cef7021 Compare April 10, 2025 07:07
@Bertk Bertk changed the title use .NET 8.0 assemblies for coverlet.core and remove Newtonsoft.Json use .NET 8.0 target framework for coverlet.core and remove Newtonsoft.Json Apr 14, 2025
@Bertk Bertk requested a review from Copilot June 5, 2025 15:18
Copilot

This comment was marked as outdated.

@Bertk Bertk requested a review from daveMueller June 5, 2025 17:23
@Bertk Bertk force-pushed the sdk-8.0.x-requirement branch from d676f33 to 9a478f5 Compare June 12, 2025 11:18
@Bertk Bertk force-pushed the sdk-8.0.x-requirement branch from 0696828 to 627840f Compare August 27, 2025 06:20
….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.
@Bertk Bertk force-pushed the sdk-8.0.x-requirement branch from 627840f to 51e915b Compare August 27, 2025 06:33
@Bertk Bertk requested a review from Copilot August 27, 2025 07:14
Copy link

@Copilot Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants