diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs index 218b52ea3..094ca7a57 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -24,12 +24,12 @@ public RuntimeInfo(IServiceProvider serviceProvider, Logger logger) serviceProvider.GetStatus(ServiceProvider.SERVICE_NAME) == ServiceControllerStatus.StartPending; //Guarded to avoid issues when running in a non-managed process - var entry = Assembly.GetEntryAssembly(); + var entry = Process.GetCurrentProcess().MainModule; if (entry != null) { - ExecutingApplication = entry.Location; - IsWindowsTray = OsInfo.IsWindows && entry.ManifestModule.Name == $"{ProcessProvider.READARR_PROCESS_NAME}.exe"; + ExecutingApplication = entry.FileName; + IsWindowsTray = OsInfo.IsWindows && entry.ModuleName == $"{ProcessProvider.READARR_PROCESS_NAME}.exe"; } }