Skip to content

Add net10.0 target framework#379

Merged
shibayan merged 2 commits into
masterfrom
feature/net10-multi-targeting
Jul 5, 2026
Merged

Add net10.0 target framework#379
shibayan merged 2 commits into
masterfrom
feature/net10-multi-targeting

Conversation

@shibayan

@shibayan shibayan commented Jul 5, 2026

Copy link
Copy Markdown
Owner

Summary

Multi-targets the library and test project to net8.0 + net10.0.

  • Sharprompt.csproj / Sharprompt.Tests.csproj: <TargetFrameworks>net8.0;net10.0</TargetFrameworks> — the full test suite now runs on both runtimes.
  • The _PackSourceGenerator target is TFM-independent, so it is now conditioned to pack the analyzer only once (previously it would be added per-TFM, producing duplicate-file pack warnings).
  • build.yml / publish.yml: install both the 8.0.x and 10.0.x SDKs (running the net8.0 test target requires the .NET 8 runtime; DOTNET_VERSION env replaced by an inline version list).

Verification

  • Build clean, 330 tests × 2 TFMs (net8.0 / net10.0) all pass
  • dotnet pack: package contains lib/net8.0, lib/net10.0 (with satellite resources), and analyzers/dotnet/cs exactly once — no pack warnings
  • dotnet format clean

🤖 Generated with Claude Code

Multi-target the library and tests to net8.0 and net10.0. The source
generator analyzer is TFM-independent, so it is packed only once. CI
installs both SDKs since running tests for the net8.0 target requires
the .NET 8 runtime.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 5, 2026 13:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Multi-targets Sharprompt and its test suite for net8.0 and net10.0, ensuring builds/tests run on both runtimes while avoiding duplicate analyzer packing during dotnet pack.

Changes:

  • Multi-targeted library and test projects to net8.0;net10.0.
  • Conditioned _PackSourceGenerator so the analyzer is packed only once when multi-targeting.
  • Updated GitHub Actions workflows to install both .NET SDK 8.0.x and 10.0.x.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/Sharprompt.Tests/Sharprompt.Tests.csproj Multi-targets the test project for net8.0 + net10.0.
src/Sharprompt/Sharprompt.csproj Multi-targets the library and adjusts analyzer packing for multi-target builds.
.github/workflows/build.yml Installs both .NET 8 and .NET 10 SDKs for CI build/test/lint.
.github/workflows/publish.yml Installs both .NET 8 and .NET 10 SDKs for packing/publishing.

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

Comment thread src/Sharprompt/Sharprompt.csproj Outdated
Avoid hard-coding net8.0 so the analyzer keeps being packed if the
TargetFrameworks list changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@shibayan shibayan merged commit 95fe600 into master Jul 5, 2026
5 checks passed
@shibayan shibayan deleted the feature/net10-multi-targeting branch July 5, 2026 13:43
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