diff --git a/src/libs/H.NotifyIcon/Core/TrayIcon.cs b/src/libs/H.NotifyIcon/Core/TrayIcon.cs index aa3cb44..fbcbdd9 100644 --- a/src/libs/H.NotifyIcon/Core/TrayIcon.cs +++ b/src/libs/H.NotifyIcon/Core/TrayIcon.cs @@ -239,7 +239,15 @@ public static string GetProcessPath() Assembly.GetEntryAssembly() ?? throw new InvalidOperationException("Entry assembly is not found."); - return assembly.Location; +#pragma warning disable IL3000 + var location = assembly.Location; +#pragma warning restore IL3000 + if (string.IsNullOrWhiteSpace(location)) + { + location = AppContext.BaseDirectory; + } + + return location; } ///