Skip to content

Commit

Permalink
Merge pull request #724 from immense/tech/platform-guards
Browse files Browse the repository at this point in the history
Add platform guards for Windows APIs.
  • Loading branch information
bitbound authored Sep 1, 2023
2 parents ff11f18 + a379a67 commit 428aa96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
3 changes: 3 additions & 0 deletions Desktop.Win/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Avalonia;
using Immense.RemoteControl.Desktop.UI;
using Desktop.Shared.Services;
using System.Runtime.Versioning;

namespace Remotely.Desktop.Win;

Expand All @@ -26,6 +27,8 @@ public static AppBuilder BuildAvaloniaApp()
.WithInterFont()
.LogToTrace();


[SupportedOSPlatform("windows")]
public static async Task Main(string[] args)
{
var version = AppVersionHelper.GetAppVersion();
Expand Down

0 comments on commit 428aa96

Please sign in to comment.