-
Notifications
You must be signed in to change notification settings - Fork 389
Use multi targets projects for coverlet.collector, coverlet.msbuild.tasks packages #1742
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
- Set `NetCurrent` to `net9.0` and `NetMinimum` to `net8.0` in `Directory.Build.props`. - Updated SDK version in `global.json` to `9.0.203`. - Changed target frameworks in `coverlet.collector.csproj`, `coverlet.console.csproj`, `coverlet.core.csproj`, and `coverlet.msbuild.tasks.csproj` to support multiple frameworks. - Modified `CoverletToolsPath` in `Directory.Build.targets` to include `netstandard2.0`. - Updated coverage file naming in `Msbuild.cs` to reflect the build target framework.
b133a8e
to
06ce08a
Compare
12f47ad
to
3a1b667
Compare
3a1b667
to
8009584
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 pull request modernizes the project to support .NET 8 and 9 as the target frameworks, replacing the previous .NET 6.0 support. The most significant changes include updating target frameworks across all projects, migrating from Newtonsoft.Json to System.Text.Json, consolidating build configurations, and improving package management for multi-targeting scenarios.
Key Changes:
- Updated target frameworks from .NET 6.0 to .NET 8.0 (minimum) and .NET 9.0 (current)
- Migrated JSON handling from Newtonsoft.Json to System.Text.Json throughout the codebase
- Restructured MSBuild tasks and collector packages to support multi-targeting with proper NuGet package layout
Reviewed Changes
Copilot reviewed 42 out of 44 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
test/coverlet.tests.utils/TestUtils.cs | Updated framework detection logic to support .NET 8.0, 9.0, and 10.0, simplified test results path |
test/coverlet.integration.tests/Msbuild.cs | Updated test framework references from net6.0 to net8.0/net9.0 |
src/coverlet.msbuild.tasks/coverlet.msbuild.tasks.csproj | Added multi-targeting support (netstandard2.0 and NetMinimum) with updated package layout |
src/coverlet.core/Reporters/JsonReporter.cs | Migrated from Newtonsoft.Json to System.Text.Json with proper serialization options |
src/coverlet.core/Coverage.cs | Replaced Newtonsoft.Json dependencies with System.Text.Json throughout coverage processing |
global.json | Updated .NET SDK version from 8.0.407 to 9.0.302 |
Directory.Packages.props | Updated package versions and removed Newtonsoft.Json dependency |
Comments suppressed due to low confidence (2)
src/coverlet.core/Instrumentation/CecilAssemblyResolver.cs:325
- The variable name 'runtimeoptionselement' is inconsistent with the naming pattern used elsewhere in the method. It should be 'includedFrameworksElement' for clarity and consistency.
if (runtimeOptionsElement.TryGetProperty("includedFrameworks", out JsonElement runtimeoptionselement))
test/coverlet.integration.tests/DeterministicBuild.cs:22
- [nitpick] The field name '_testProjectTfms' uses an abbreviation 'Tfms'. Consider using the full name '_testProjectTargetFrameworks' for better clarity.
private string[] _testProjectTfms = [];
Since .NET 10 RC 1 is expected in September and GA in November does it make sense to start looking at that as well in case there are adaptations you would like to be present for this PR as well? |
This pull request updates the project to support .NET 8 and 9, modernizes dependencies, and refines the build and testing process. The most important changes include updating target frameworks, revising dependency versions, improving documentation, and enhancing build and test configurations.
Note
This PR should be merged after PR #1733.