Skip to content

Add net10.0 target framework + refresh CI#11

Open
Rolling2405 wants to merge 1 commit intoNeVeSpl:mainfrom
Rolling2405:feat/net10-target
Open

Add net10.0 target framework + refresh CI#11
Rolling2405 wants to merge 1 commit intoNeVeSpl:mainfrom
Rolling2405:feat/net10-target

Conversation

@Rolling2405
Copy link
Copy Markdown

Summary

Adds explicit net10.0 target framework support to the library and test project, and refreshes the GitHub Actions workflow accordingly. netstandard2.0 (library) and net8.0 (tests) are preserved — this is purely additive for downstream consumers who are starting to target .NET 10.

Changes

sources/NetArchTest/NetArchTest.csproj

  • <TargetFramework>netstandard2.0</TargetFramework><TargetFrameworks>netstandard2.0;net10.0</TargetFrameworks>
  • Switched the package icon entry from <None Update> to <None Include> with an explicit PackagePath="\Resources\". Under multi-targeting on newer SDKs, <None Update> only patches files that are already in the project's implicit include set, which caused error NU5046: The icon file 'Resources\icon.png' does not exist in the package during pack. <None Include> resolves it cleanly. No behavioral change to the published package — Resources/icon.png still ends up at the same path inside the .nupkg.

tests/NetArchTest.Rules.UnitTests/NetArchTest.UnitTests.csproj

  • <TargetFramework>net8.0</TargetFramework><TargetFrameworks>net8.0;net10.0</TargetFrameworks>. net8.0 retained.

.github/workflows/net-workflow.yml

  • actions/checkout@v3@v4
  • actions/setup-dotnet@v3@v4
  • Added 10.0.x to the dotnet-version list alongside the existing 3.1.x and 8.0.x.

Local verification

dotnet build  → 0 errors
dotnet test   → NetArchTest.UnitTests.dll (net8.0):  353 passed, 2 skipped
                NetArchTest.UnitTests.dll (net10.0): 353 passed, 2 skipped
                NetArchTest.SampleTests.dll (net8.0):  3 passed

Zero public API changes. No new dependencies. No source-code changes outside csproj/yml.

Cross-pollination note

FYI: BenMorris/NetArchTest also has a parallel net10 PR open (BenMorris/NetArchTest#158). Since this project is built upon NetArchTest.Rules v1.3.2, you may find it useful as a reference if you want to compare approaches — though this PR is intentionally scoped only to what's relevant for the eNhancedEdition codebase.

Out of scope

AOT/trim annotations and Span<T>-based parsing improvements are intentionally not included here — they'd be larger, riskier, and warrant separate PRs that can be evaluated on their own merits.

Adds .NET 10 to library and test multi-targets while preserving
netstandard2.0 (library) and net8.0 (tests). Fixes packaging icon
declaration to use <None Include> (was <None Update>) so it resolves
correctly under multi-targeting on newer SDKs.

Workflow:
- Bump actions/checkout v3 -> v4
- Bump actions/setup-dotnet v3 -> v4
- Add 10.0.x to dotnet-version (alongside 3.1.x and 8.0.x)

Verified locally: 353 passed (2 skipped) on both net8.0 and net10.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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