diff --git a/.editorconfig b/.editorconfig index ab2e60a64..a0734b78d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -194,7 +194,6 @@ dotnet_diagnostic.CA1819.severity = suggestion dotnet_diagnostic.CA1822.severity = suggestion dotnet_diagnostic.CA1823.severity = suggestion dotnet_diagnostic.CA1824.severity = suggestion -dotnet_diagnostic.CA1839.severity = suggestion dotnet_diagnostic.CA1840.severity = suggestion dotnet_diagnostic.CA1845.severity = suggestion dotnet_diagnostic.CA1846.severity = suggestion diff --git a/src/NzbDrone.Common/ServiceProvider.cs b/src/NzbDrone.Common/ServiceProvider.cs index b6b7903d0..323f50cf3 100644 --- a/src/NzbDrone.Common/ServiceProvider.cs +++ b/src/NzbDrone.Common/ServiceProvider.cs @@ -64,7 +64,7 @@ namespace NzbDrone.Common var args = $"create {serviceName} " + $"DisplayName= \"{serviceName}\" " + - $"binpath= \"{Process.GetCurrentProcess().MainModule.FileName}\" " + + $"binpath= \"{Environment.ProcessPath}\" " + "start= auto " + "depend= EventLog/Tcpip/http " + "obj= \"NT AUTHORITY\\LocalService\""; diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index 2cd9bb2f8..c72b07dcb 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -46,7 +46,7 @@ namespace NzbDrone.Host try { Logger.Info("Starting Sonarr - {0} - Version {1}", - Process.GetCurrentProcess().MainModule.FileName, + Environment.ProcessPath, Assembly.GetExecutingAssembly().GetName().Version); var startupContext = new StartupContext(args);