diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/GeneralSettings.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/GeneralSettings.cs index 6e3ed59038..6b4712ff96 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/GeneralSettings.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/GeneralSettings.cs @@ -59,7 +59,15 @@ namespace Microsoft.PowerToys.Settings.UI.Lib this.AutoDownloadUpdates = false; this.Theme = "system"; this.SystemTheme = "light"; - this.PowertoysVersion = interop.CommonManaged.GetProductVersion(); + try + { + this.PowertoysVersion = DefaultPowertoysVersion(); + } + catch + { + this.PowertoysVersion = "v0.0.0"; + } + this.Enabled = new EnabledModules(); this.CustomActionName = string.Empty; } @@ -69,5 +77,10 @@ namespace Microsoft.PowerToys.Settings.UI.Lib { return JsonSerializer.Serialize(this); } + + private string DefaultPowertoysVersion() + { + return interop.CommonManaged.GetProductVersion(); + } } }