We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
--version
1 parent 55c233f commit 281de06Copy full SHA for 281de06
1 file changed
SnapX.Avalonia/Program.cs
@@ -1,10 +1,18 @@
1
// See https://aka.ms/new-console-template for more information
2
#pragma warning disable CA1416 // I am aware
3
+using System.Reflection;
4
using Avalonia;
5
using Avalonia.Dialogs;
6
using Avalonia.Media;
7
using SnapX.Avalonia;
8
9
+if (args.Length != 0 && (args[0] == "--version" || args[0] == "-v"))
10
+{
11
+ var informationalVersion = Assembly.GetExecutingAssembly().GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion ?? "Unknown";
12
+ Console.WriteLine(informationalVersion);
13
+ return;
14
+}
15
+
16
BuildAvaloniaApp()
17
.StartWithClassicDesktopLifetime(args);
18
0 commit comments