-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Update Roslyn to 5.0.0-2.26070.104 and suppress IDE0071/IDE0031 #123527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… suppress IDE0071 Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
…rors Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
Co-authored-by: agocke <515774+agocke@users.noreply.github.com>
|
@sbomer I made a clean upgrade PR here |
|
@jjonescz Can you look to why IDE warnings are suddenly showing up in our build? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the Roslyn analyzer version to match the 10.0.1xx SDK and configures the build to handle new analyzer warnings that would otherwise cause build failures when TreatWarningsAsErrors=true is enabled.
Changes:
- Bump Roslyn/CodeAnalysis from version 4.14.0 to 5.0.0-2.26070.104
- Suppress IDE0071 (simplify interpolation) and IDE0031 (use null propagation) as silent diagnostics to prevent build errors while preserving IDE hints
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| eng/Versions.props | Updates MicrosoftCodeAnalysisVersion_LatestVS to align with 10.0.1xx SDK |
| .editorconfig | Adds silent severity for IDE0071 and IDE0031 to prevent build failures from stricter analyzer enforcement |
|
/ba-g browser instability |
I think there were some fixes in roslyn, i.e., it was previously a bug that those warnings weren't displayed at all locations. |
Description
Updates Roslyn to 5.0.0-2.26070.104 to match the 10.0.1xx SDK. The new analyzer version enforces IDE0071 and IDE0031 more strictly, causing build failures with
TreatWarningsAsErrors=true.Changes
eng/Versions.props
MicrosoftCodeAnalysisVersion_LatestVS:4.14.0→5.0.0-2.26070.104.editorconfig (global
[*.cs]section)dotnet_diagnostic.IDE0071.severity = silent- Suppresses false positives forReadOnlySpan<char>.ToString()in string interpolations (required for netstandard targets where ReadOnlySpan cannot be directly interpolated)dotnet_diagnostic.IDE0031.severity = silent- Suppresses null propagation suggestionsSetting
silentseverity preserves IDE hints while preventing build errors.Testing
Resolves build failures in:
System.Security.Cryptography.MLDsaCng.Windows.csSystem.Security.Cryptography.MLDsaImplementation.Windows.csSystem.Reflection.Metadata.TypeNameParser.csOriginal prompt
This pull request was created from Copilot chat.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.