Skip to content

Commit 26443a8

Browse files
committed
fix: warnings
1 parent 442f7ae commit 26443a8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

template/framework/__PROJECT_NAME__/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
using Microsoft.UI.Xaml;
55
using WinRT;
66

7+
// Windows-only WinUI desktop app. The custom entry point (DISABLE_XAML_GENERATED_MAIN)
8+
// has no platform attribute, so CA1416 treats every Windows API call site as "reachable
9+
// on all platforms." Declaring the assembly's supported platform once tells the analyzer
10+
// the whole assembly only runs on Windows >= 17763, silencing those false positives.
11+
[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows10.0.17763.0")]
12+
713
namespace __PROJECT_NAME__
814
{
915
public static class Program

0 commit comments

Comments
 (0)