From 69902ea2179d4be821be3b64f512a5d08ca3f568 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Wed, 30 Aug 2023 14:49:16 -0700 Subject: [PATCH] Add platform guards for Windows APIs. --- .editorconfig | 2 ++ Desktop.Win/Program.cs | 3 +++ submodules/Immense.RemoteControl | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.editorconfig b/.editorconfig index 734d59e6..85d0d498 100644 --- a/.editorconfig +++ b/.editorconfig @@ -114,6 +114,7 @@ dotnet_style_qualification_for_field = false:silent # IDE0130: Namespace does not match folder structure dotnet_diagnostic.IDE0130.severity = error +dotnet_diagnostic.CA1416.severity = error [*.cs] csharp_indent_labels = one_less_than_current @@ -174,3 +175,4 @@ dotnet_diagnostic.CS8602.severity = error # CS8631: The type cannot be used as type parameter in the generic type or method. Nullability of type argument doesn't match constraint type. dotnet_diagnostic.CS8631.severity = error +csharp_style_prefer_primary_constructors = true:suggestion diff --git a/Desktop.Win/Program.cs b/Desktop.Win/Program.cs index ca1ced52..5fb9ec1d 100644 --- a/Desktop.Win/Program.cs +++ b/Desktop.Win/Program.cs @@ -14,6 +14,7 @@ using Immense.RemoteControl.Desktop.UI.Services; using Avalonia; using Immense.RemoteControl.Desktop.UI; using Desktop.Shared.Services; +using System.Runtime.Versioning; namespace Remotely.Desktop.Win; @@ -26,6 +27,8 @@ public class Program .WithInterFont() .LogToTrace(); + + [SupportedOSPlatform("windows")] public static async Task Main(string[] args) { var version = AppVersionHelper.GetAppVersion(); diff --git a/submodules/Immense.RemoteControl b/submodules/Immense.RemoteControl index ab9f9604..80d184c4 160000 --- a/submodules/Immense.RemoteControl +++ b/submodules/Immense.RemoteControl @@ -1 +1 @@ -Subproject commit ab9f9604be3d9ece45de0810e4826fe28ac5a932 +Subproject commit 80d184c4aca15e7c0482ec2bd014730968643909