Closed Suriman closed 2 years ago
@Suriman Can you try <XamlGeneratorAnalyzerSuppressions Include="csharp-SA1633" />
?
The problem is in the generation of this file:
There are no supressions applied to that string so using
GitHubBuild Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported. - uno/BindableTypeProvidersGenerationTask.cs at master · unoplatform/uno
@ADD-David-Antolin It looks like we are missing a call for GenerateCSharpPragmaSupressions
around these lines https://github.com/unoplatform/uno/blob/7cc2df180fb8b5833f3f6e05b50ac8d4ed4a8e99/src/SourceGenerators/Uno.UI.SourceGenerators/BindableTypeProviders/BindableTypeProvidersGenerationTask.cs#L173-L175
I can take a look once I finish some work. @jeromelaban Assign me this please.
There should be no need for the suppression actually. We don't mark the file as auto-generated which is wrong too. If it's marked as such, then SA1633 will not produce a diagnostic at all.
To be clear, there are two issues here:
After updating to Uno 4.7 this error is happening again with your autogenerated class LocalizationResources.cs which it is not marked as autogenerated, so please reopen the issue.
@ADD-David-Antolin Thanks for raising this. I opened https://github.com/unoplatform/uno/pull/11291 to fix it.
@ADD-David-Antolin make sure to open new issues even if the symptoms look similar. We generally do not reopen older issues as they are generally effectively different.
Current behavior
In the library .csproj file, the 'TreatWarningsAsErrors' configuration is enabled and the 'XamlGeneratorAnalyzerSuppressions Include="StyleCop.CSharp.DocumentationRules-SA1633"' configure is also added, but the build error still appears.
Expected behavior
It shouldn't give any compile errors.
How to reproduce it (as minimally and precisely as possible)
Open the attached project and compile it. The SA1633 error should appear.
Workaround
Add the SA1633 to the NoWarn configuration.
Works on UWP/WinUI
No
Environment
Uno.UI / Uno.UI.WebAssembly / Uno.UI.Skia
NuGet package version(s)
Uno.WinUI 4.5.12
Affected platforms
iOS, Android, WebAssembly, macOS, Skia (WPF), Skia (GTK on Linux/macOS/Windows), Windows
IDE
Visual Studio 2022
IDE version
17.3.4
Relevant plugins
No response
Anything else we need to know?
See attached file! SA1633CompilationError2.zip