Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add platform guards for Windows APIs. #724

Merged
merged 3 commits into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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