Skip to content

Add net6.0 to test targets#112

Merged
Tyrrrz merged 3 commits intoprimefrom
copilot/add-net5-to-testing-targets
Apr 16, 2026
Merged

Add net6.0 to test targets#112
Tyrrrz merged 3 commits intoprimefrom
copilot/add-net5-to-testing-targets

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 16, 2026

Adds net6.0 as a test target alongside net10.0 (and net462 on Windows), and installs both SDKs on CI so the net6.0 test run has its runtime available. (net5.0 was skipped because Microsoft.NET.Test.Sdk 17.8.0's test host requires .NET 6+, causing zero tests to be discovered on net5.0.)

  • PolyShim.Tests.csproj: TargetFrameworksnet6.0;net10.0 (net6.0 first)
  • main.yml: passes dotnet-version to the reusable workflow to install both 6.0.x and 10.0.x; global.json stays pinned to 10.0.100 as the build SDK

Copilot AI and others added 2 commits April 16, 2026 16:53
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/360379ff-dc17-49d4-a5a0-9daa1a21349a

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/bc4ff120-f472-42fe-b68b-ff85217ea8a5

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
@Tyrrrz Tyrrrz added the enhancement New feature or request label Apr 16, 2026
@Tyrrrz Tyrrrz marked this pull request as ready for review April 16, 2026 17:04
Copilot AI review requested due to automatic review settings April 16, 2026 17:04
Copy link
Copy Markdown
Contributor

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

Adds .NET 5 (net5.0) as an additional test target so the test suite runs on both net5.0 and net10.0 (plus net462 on Windows), and updates CI to install the required .NET SDKs.

Changes:

  • Multi-target PolyShim.Tests for net5.0 and net10.0 (with net462 appended on Windows).
  • Update the GitHub Actions workflow to install both 5.0.x and 10.0.x SDKs for CI runs.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
PolyShim.Tests/PolyShim.Tests.csproj Adds net5.0 to TargetFrameworks to run tests against .NET 5 and .NET 10.
.github/workflows/main.yml Passes a multi-version dotnet-version input so CI installs SDKs for both net5.0 and net10.0 test runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.88%. Comparing base (9387540) to head (c243ab8).
⚠️ Report is 1 commits behind head on prime.

Additional details and impacted files
@@            Coverage Diff             @@
##            prime     #112      +/-   ##
==========================================
+ Coverage   90.03%   90.88%   +0.85%     
==========================================
  Files         269      269              
  Lines        4604     4607       +3     
  Branches      367      378      +11     
==========================================
+ Hits         4145     4187      +42     
+ Misses        378      337      -41     
- Partials       81       83       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Tyrrrz
Copy link
Copy Markdown
Owner

Tyrrrz commented Apr 16, 2026

@copilot why are we getting 0 tests ran for .NET 5?

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

@copilot why are we getting 0 tests ran for .NET 5?

The test host bundled with Microsoft.NET.Test.Sdk 17.8.0 requires .NET 6+ to run. Since .NET 5 went end-of-life in May 2022, vstest's in-process test host can't initialize against the net5.0 DLL, which is why it silently reports "No test is available" instead of a proper error.

If testing an older .NET version is the goal, net6.0 (LTS until Nov 2024) or net8.0 (current LTS) would work with the current package versions. Should I swap net5.0 for one of those?

Copilot AI requested a review from Tyrrrz April 16, 2026 17:21
@Tyrrrz
Copy link
Copy Markdown
Owner

Tyrrrz commented Apr 16, 2026

@copilot let's try net6.0. Unfortunately, net8.0 is too new for our purposes.

Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/e8424fb6-7b0e-45dc-868f-7fd324a3233f

Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 16, 2026

@copilot let's try net6.0. Unfortunately, net8.0 is too new for our purposes.

Done in c243ab8. Swapped net5.0net6.0 in the test project and 5.0.x6.0.x in the CI workflow.

Copilot AI changed the title Add net5.0 to test targets Add net6.0 to test targets Apr 16, 2026
@Tyrrrz Tyrrrz merged commit fb2c7b2 into prime Apr 16, 2026
5 checks passed
@Tyrrrz Tyrrrz deleted the copilot/add-net5-to-testing-targets branch April 16, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants