-
Notifications
You must be signed in to change notification settings - Fork 466
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
RS0041 cannot be solved for Resources.Designer.cs #5521
Comments
You may want to suppress the diagnostic only for this specific generated file. In editorconfig you can do that like this: [*.Designer.cs]
dotnet_diagnostic.RS0041.severity = none |
Is there also a way make the generated code be nullable aware? I saw that Arcade has a Source Generator that probably does this. Is it available in a Nuget package? |
What would be the official way to make the code generated for resx nullable aware and types in it non-oblivious reference types? This is important to us because it uses the
|
ResxSourceGenerator produces files with |
It's published here:
Is there a bug for this? |
Analyzer
Diagnostic ID: RS0041:
Symbol uses some oblivious reference types
Analyzer source
NuGet Package: Microsoft.CodeAnalysis.PublicApiAnalyzers
Version: 3.3.2 (Latest)
Problem
I get a lot of warnings similar to these on various Resources.Designer.cs files:
Warning RS0041 Symbol 'ResourceManager.get' uses some oblivious reference types
Since this is code generated by
PublicResXFileCodeGenerator
, I have no way of annotating those generated types. I don't want to turn off RS0041 because everything else is annotated correctly. I don't see a way how to solve this except by turning of RS0041 for the whole project.The text was updated successfully, but these errors were encountered: