Fix RS1038 Warning: Compiler extensions should be implemented in assemblies with compiler-provided references#390
Merged
TheCodeTraveler merged 1 commit intomainfrom May 27, 2025
Fix-RS1038-Compiler-extensions-should-be-implemented-in-assemblies-with-compiler-provided-references
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR ensures compliance with the RS1038 analyzer by removing the workspaces package reference and treating RS1038 as an error.
- Swap
Microsoft.CodeAnalysis.CSharp.WorkspacesforMicrosoft.CodeAnalysis.CSharpat 4.14.0 - Add
RS1038to the<WarningsAsErrors>list and adjust the surrounding XML comment
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/CommunityToolkit.Maui.Markup.SourceGenerators/CommunityToolkit.Maui.Markup.SourceGenerators.csproj | Replaced Microsoft.CodeAnalysis.CSharp.Workspaces with Microsoft.CodeAnalysis.CSharp |
| Directory.Build.props | Added RS1038 to WarningsAsErrors and moved the XML comment closing tag |
Comments suppressed due to low confidence (1)
Directory.Build.props:70
- The XML comment closing marker (
-->) is on the same line as the RS1038 entry; please verify that the opening<!--is correctly paired so that the warning entry is not accidentally commented out or causing an XML parse error.
RS1038: Compiler extensions should be implemented in assemblies with compiler-provided references-->
This was referenced Apr 27, 2026
Closed
Closed
Closed
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.
Description of Change
This PR adds
RS1038to<WarningsAsErrors>and replacesMicrosoft.CodeAnalysis.CSharp.Workspaces->Microsoft.CodeAnalysis.CSharpLink to RS1038 Docs:
https://github.com/dotnet/roslyn-analyzers/blob/main/docs/rules/RS1038.md
Additional information
Link to Compiler Warnings seen in
CommunityToolkit.Maui: https://github.com/CommunityToolkit/Maui/actions/runs/15263232470/job/42928522628#step:14:61