Open Youssef1313 opened 2 months ago
If we cannot pre-compile this then autogenerated is probably best since we have no idea what additional analyzers may be present where autogenerated excludes the file from all of these additional analyzers which means you won't get warnings/errors for things like formatting or nullability, etc.
@dansiegel Just came across a nullability error after upgrading MSTest
[5/7/2024 10:32:46 AM] HRAppBuild: C:\Users\VssAdministrator.nuget\packages\uno.ui.runtimetests.engine\0.15.0-dev.56\src\UI\UnitTestMethodInfo.cs(94,43): error CS8619: Nullability of reference types in value of type 'object?[]' doesn't match target type 'object[]'. [D:\a\1\s\src\Uno.UI.RuntimeTests\Tests\HotReload\Frame\HRApp\Uno.UI.RuntimeTests.HRApp.Skia.Gtk.csproj]
So indeed, suppressing only formatting warnings isn't going to work very well. For now we'll need to have // <auto-generated>
Current behavior
The HRApp in Uno runtime tests is using the runtimetests engine package and the app builds with formatting warnings:
Expected behavior
NOTE: We don't know what formatting rules are set by the consuming apps, so fixing formatting warnings isn't possible. Instead, we should have
#pragma warning disable IDE0055
or have// <auto-generated>
tag at the top.How to reproduce it (as minimally and precisely as possible)
Environment
Nuget Package:
Package Version(s):
Affected platform(s):
Visual Studio:
Relevant plugins:
Anything else we need to know?