Add Wolverine.SourceGeneration to slnx (supersedes #2575)#2592
Merged
jeremydmiller merged 2 commits intomainfrom Apr 26, 2026
Merged
Add Wolverine.SourceGeneration to slnx (supersedes #2575)#2592jeremydmiller merged 2 commits intomainfrom
jeremydmiller merged 2 commits intomainfrom
Conversation
After GH-2575 added Wolverine.SourceGeneration to wolverine.slnx, `dotnet build wolverine.slnx --framework net9.0` started failing with NETSDK1005 because the analyzer project only targets netstandard2.0 (required for Roslyn analyzer loadability). The error doesn't appear in unconstrained builds because the project naturally selects its single TargetFramework, but CI and local commands that pin a framework hit it. The project is already pulled in transitively as an analyzer via Wolverine.csproj's ProjectReference (OutputItemType="Analyzer", ReferenceOutputAssembly="false"), so it gets built whenever Wolverine itself does. Marking it Build="false" in the slnx — same pattern used for build/build.csproj — keeps it visible in the IDE solution view but skips it from solution-level builds, sidestepping the framework resolution mismatch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supersedes #2575 by @saithis. Their original commit is preserved verbatim with their authorship intact; this PR adds one follow-up commit on top to fix the resulting framework-pinned build failure.
What @saithis fixed
Wolverine.SourceGeneration.csprojis referenced fromWolverine.csprojas an analyzer (OutputItemType="Analyzer",ReferenceOutputAssembly="false") but was missing fromwolverine.slnx, so the IDE solution view couldn't see it and adotnet build wolverine.slnxwould fail to find it. Adding the project to the slnx is the right call.Why a follow-up commit was needed
After @saithis's add,
dotnet build wolverine.slnx --framework net9.0started failing with:The analyzer project only targets
netstandard2.0(required for Roslyn analyzer loadability). Without--framework, MSBuild lets each project pick its own target framework and the analyzer builds happily. With--framework net9.0pinned, MSBuild tries to build the analyzer for net9.0 too and there's no such target.The follow-up commit marks the project
Build="false"in the slnx — the same pattern already used forbuild/build.csproj. The project stays visible in the IDE solution view, but solution-level builds skip it. It still gets built wheneverWolverine.csprojis built, via the existing<ProjectReference OutputItemType="Analyzer" />, so nothing downstream changes.Verification
dotnet build wolverine.slnx --framework net9.0→ 0 errors (was 1 NETSDK1005)dotnet build src/Wolverine/Wolverine.csproj --framework net9.0→ 0 errors, 0 warnings (analyzer still attached and runs)dotnet build wolverine.slnx(no framework) → 27 pre-existing OpenAPI sample-app errors, none related to this changeTest plan
dotnet build wolverine.slnx --framework net9.0succeedsmain🤖 Generated with Claude Code