Bump global.json SDK to 10.0.400 by mbcrawfo · Pull Request #6647 · npgsql/npgsql · GitHub
Skip to content

Bump global.json SDK to 10.0.400 - #6647

Open
mbcrawfo wants to merge 1 commit into
npgsql:mainfrom
mbcrawfo:bump-global-json-sdk-10.0.400
Open

mbcrawfo wants to merge 1 commit into
npgsql:mainfrom
mbcrawfo:bump-global-json-sdk-10.0.400

Conversation

@mbcrawfo

Copy link
Copy Markdown

#6635 bumped Microsoft.CodeAnalysis.CSharp/Analyzers to 5.9.0. A source generator can't reference a newer Roslyn than the compiler that loads it, so building Npgsql.SourceGenerators with an older SDK fails:

CSC : error CS9057: Analyzer assembly '.../Npgsql.SourceGenerators.dll' cannot be used because it references
version '5.9.0.0' of the compiler, which is newer than the currently running version '5.3.0.0'.

global.json currently allows 10.0.200 (Roslyn 5.3). CI still passes because runners have newer SDKs installed and rollForward: latestMajor picks them. Local builds on an SDK older than 10.0.400 fail.

This raises the minimum to 10.0.400, the first SDK that ships Roslyn 5.9. I checked by inspecting Microsoft.Net.Sdk.Compilers.Toolset: 10.0.303 → 5.6, 10.0.400 → 5.9. Now an SDK that's too old gives a clear "SDK not found" error instead of CS9057.

Verified locally: src/Npgsql fails with CS9057 on SDK 10.0.200 and builds on 10.0.401.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YakHXFUBSSV4annG4xrCH8

Microsoft.CodeAnalysis.CSharp was bumped to 5.9.0 in npgsql#6635, which requires
Roslyn 5.9 to load Npgsql.SourceGenerators. SDK 10.0.3xx and earlier ship
older compilers (10.0.200 ships 5.3), failing with CS9057. 10.0.400 is the
first SDK that includes Roslyn 5.9.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YakHXFUBSSV4annG4xrCH8
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.

1 participant