We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Diagnostic ID: RS0016: Symbol 'BuildRenderTree' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
NuGet Package: Microsoft.CodeAnalysis.PublicApiAnalyzers
Version: 3.3.4
Razor libraries are not handled well when turning on the PublicApiAnalyzers rules.
Warnings get created on generated code and it is impossible to turn them off without disabling it for the entire project.
Adding an entry for [*.g.cs] does not work.
For example:
C:\repo\RazorClassLibrary1\obj\Debug\net8.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Component1_razor.g.cs(25,33,25,48): warning RS0016: Symbol 'BuildRenderTree' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
Component1_razor.g.cs is generated, and BuildRenderTree is on the base class.
This would be workable if I could solve it by adding a line to the PublicAPI.Shipped.txt but this does not work:
virtual Component1.BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder! builder) -> void
Ideally, it would handle razor inheritance correctly, or it would resolve if I manually added a line to PublicAPI.Shipped.txt
nothing works
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Analyzer
Diagnostic ID: RS0016: Symbol 'BuildRenderTree' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
Analyzer source
NuGet Package: Microsoft.CodeAnalysis.PublicApiAnalyzers
Version: 3.3.4
Describe the bug
Razor libraries are not handled well when turning on the PublicApiAnalyzers rules.
Warnings get created on generated code and it is impossible to turn them off without disabling it for the entire project.
Adding an entry for [*.g.cs] does not work.
For example:
C:\repo\RazorClassLibrary1\obj\Debug\net8.0\Microsoft.CodeAnalysis.Razor.Compiler\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Component1_razor.g.cs(25,33,25,48): warning RS0016: Symbol 'BuildRenderTree' is not part of the declared public API (https://github.com/dotnet/roslyn-analyzers/blob/main/src/PublicApiAnalyzers/PublicApiAnalyzers.Help.md)
Component1_razor.g.cs is generated, and BuildRenderTree is on the base class.
This would be workable if I could solve it by adding a line to the PublicAPI.Shipped.txt but this does not work:
virtual Component1.BuildRenderTree(Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder! builder) -> void
Steps To Reproduce
Expected behavior
Ideally, it would handle razor inheritance correctly, or it would resolve if I manually added a line to PublicAPI.Shipped.txt
Actual behavior
nothing works
Additional context
The text was updated successfully, but these errors were encountered: