diff --git a/build.sh b/build.sh index 7043b4fc4..120681108 100755 --- a/build.sh +++ b/build.sh @@ -198,25 +198,25 @@ PackageMono() # See: https://github.com/mono/mono/blob/master/tools/nuget-hash-extractor/download.sh # That list defines assemblies that are prohibited from being loaded from the appdir, instead loading from mono GAC. - # We have debian dependencies to get these installed - for assembly in System.IO.Compression System.Runtime.InteropServices.RuntimeInformation System.Net.Http + # We have debian dependencies to get these installed or facades from mono 5.10+ + for assembly in System.IO.Compression System.Runtime.InteropServices.RuntimeInformation System.Net.Http System.Globalization.Extensions System.Text.Encoding.CodePages System.Threading.Overlapped do - if [ -e $outputFolderLinux/$assembly.dll ] ; then - echo "Remove $assembly.dll (uses win32 interop)" - rm $outputFolderLinux/$assembly.dll - fi - done - - # These assemblies have facades in mono-devel, but we don't have them. - for assembly in System.Globalization.Extensions System.Text.Encoding.CodePages System.Threading.Overlapped - do - if [ -e $outputFolderLinux/$assembly.dll ] ; then - echo "Warn: Facade $assembly.dll (uses win32 interop)" - rm $outputFolderLinux/$assembly.dll - #exit 1 + if [ -e $outputFolderLinux/$assembly.dll ]; then + if [ -e $sourceFolder/Libraries/Mono/$assembly.dll ]; then + echo "Copy Mono-specific facade $assembly.dll (uses win32 interop)" + cp $sourceFolder/Libraries/Mono/$assembly.dll $outputFolderLinux/$assembly.dll + else + echo "Remove $assembly.dll (uses win32 interop)" + rm $outputFolderLinux/$assembly.dll + fi + fi done + # Remove Http binding redirect by renaming it + # We don't need this anymore once our minimum mono version is 5.10 + sed -i "s/System.Net.Http/System.Net.Http.Mono/g" $outputFolderLinux/Sonarr.Console.exe.config + echo "Renaming Sonarr.Console.exe to Sonarr.exe" rm $outputFolderLinux/Sonarr.exe* for file in $outputFolderLinux/Sonarr.Console.exe*; do diff --git a/distribution/debian/control b/distribution/debian/control index 598121d3f..26f12532f 100644 --- a/distribution/debian/control +++ b/distribution/debian/control @@ -16,7 +16,7 @@ Architecture: all Provides: nzbdrone Conflicts: nzbdrone Replaces: nzbdrone -Depends: adduser, libsqlite3-0 (>= 3.7), libmediainfo0v5 (>= 0.7.52) | libmediainfo0 (>= 0.7.52), mono-runtime (>= 5.4), libmono-system-runtime-interopservices-runtimeinformation4.0-cil (>= 4.0.0~alpha1), libmono-system-net-http4.0-cil (>= 4.0.0~alpha1), ${cli:Depends}, ${misc:Depends} +Depends: adduser, libsqlite3-0 (>= 3.7), libmediainfo0v5 (>= 0.7.52) | libmediainfo0 (>= 0.7.52), mono-runtime (>= 5.4), libmono-system-net-http4.0-cil (>= 4.0.0~alpha1), ${cli:Depends}, ${misc:Depends} Recommends: libmediainfo0v5 (>= 18.03) | libmediainfo0 (>= 18.03) Suggests: sqlite3 (>= 3.7), mediainfo (>= 0.7.52) Description: Internet PVR diff --git a/src/Libraries/Mono/System.Globalization.Extensions.dll b/src/Libraries/Mono/System.Globalization.Extensions.dll new file mode 100644 index 000000000..8c0861579 Binary files /dev/null and b/src/Libraries/Mono/System.Globalization.Extensions.dll differ diff --git a/src/Libraries/Mono/System.Runtime.InteropServices.RuntimeInformation.dll b/src/Libraries/Mono/System.Runtime.InteropServices.RuntimeInformation.dll new file mode 100644 index 000000000..e55b5eb23 Binary files /dev/null and b/src/Libraries/Mono/System.Runtime.InteropServices.RuntimeInformation.dll differ diff --git a/src/Libraries/Mono/System.Text.Encoding.CodePages.dll b/src/Libraries/Mono/System.Text.Encoding.CodePages.dll new file mode 100644 index 000000000..414770bc0 Binary files /dev/null and b/src/Libraries/Mono/System.Text.Encoding.CodePages.dll differ diff --git a/src/Libraries/Mono/System.Threading.Overlapped.dll b/src/Libraries/Mono/System.Threading.Overlapped.dll new file mode 100644 index 000000000..c06475843 Binary files /dev/null and b/src/Libraries/Mono/System.Threading.Overlapped.dll differ diff --git a/src/Libraries/Mono/readme.txt b/src/Libraries/Mono/readme.txt new file mode 100644 index 000000000..f1251a98f --- /dev/null +++ b/src/Libraries/Mono/readme.txt @@ -0,0 +1,3 @@ +Copied from mono/4.5/Facades of the mono 5.4 release. +These are the mono version of the dotnet Core TypeForwardedTo assemblies. +Using these assemblies is no longer necessary once we reach mono 5.18 as minimum version \ No newline at end of file diff --git a/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs index abe4070c6..cad3d3002 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/OsInfo.cs @@ -82,9 +82,6 @@ namespace NzbDrone.Common.EnvironmentInfo Name = Os.ToString(); FullName = Name; } - - Environment.SetEnvironmentVariable("OS_NAME", Name); - Environment.SetEnvironmentVariable("OS_VERSION", Version); } } diff --git a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs index b7ea36e5d..febace9af 100644 --- a/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs +++ b/src/NzbDrone.Common/EnvironmentInfo/RuntimeInfo.cs @@ -35,7 +35,16 @@ namespace NzbDrone.Common.EnvironmentInfo static RuntimeInfo() { - IsProduction = InternalIsProduction(); + var officialBuild = InternalIsOfficialBuild(); + + // An build running inside of the testing environment. (Analytics disabled) + IsTesting = InternalIsTesting(); + + // An official build running outside of the testing environment. (Analytics configurable) + IsProduction = !IsTesting && officialBuild; + + // An unofficial build running outside of the testing environment. (Analytics enabled) + IsDevelopment = !IsTesting && !officialBuild && !InternalIsDebug(); } public DateTime StartTime @@ -104,23 +113,21 @@ namespace NzbDrone.Common.EnvironmentInfo public bool RestartPending { get; set; } public string ExecutingApplication { get; } + public static bool IsTesting { get; } public static bool IsProduction { get; } + public static bool IsDevelopment { get; } - private static bool InternalIsProduction() + + private static bool InternalIsTesting() { - if (BuildInfo.IsDebug || Debugger.IsAttached) return false; - - //Official builds will never have such a high revision - if (BuildInfo.Version.Revision > 10000) return false; - try { var lowerProcessName = Process.GetCurrentProcess().ProcessName.ToLower(); - if (lowerProcessName.Contains("vshost")) return false; - if (lowerProcessName.Contains("nunit")) return false; - if (lowerProcessName.Contains("jetbrain")) return false; - if (lowerProcessName.Contains("resharper")) return false; + if (lowerProcessName.Contains("vshost")) return true; + if (lowerProcessName.Contains("nunit")) return true; + if (lowerProcessName.Contains("jetbrain")) return true; + if (lowerProcessName.Contains("resharper")) return true; } catch { @@ -130,7 +137,7 @@ namespace NzbDrone.Common.EnvironmentInfo try { var currentAssemblyLocation = typeof(RuntimeInfo).Assembly.Location; - if (currentAssemblyLocation.ToLower().Contains("_output")) return false; + if (currentAssemblyLocation.ToLower().Contains("_output")) return true; } catch { @@ -138,9 +145,24 @@ namespace NzbDrone.Common.EnvironmentInfo } var lowerCurrentDir = Directory.GetCurrentDirectory().ToLower(); - if (lowerCurrentDir.Contains("teamcity")) return false; - if (lowerCurrentDir.Contains("buildagent")) return false; - if (lowerCurrentDir.Contains("_output")) return false; + if (lowerCurrentDir.Contains("teamcity")) return true; + if (lowerCurrentDir.Contains("buildagent")) return true; + if (lowerCurrentDir.Contains("_output")) return true; + + return false; + } + + private static bool InternalIsDebug() + { + if (BuildInfo.IsDebug || Debugger.IsAttached) return true; + + return false; + } + + private static bool InternalIsOfficialBuild() + { + //Official builds will never have such a high revision + if (BuildInfo.Version.Major >= 10 || BuildInfo.Version.Revision > 10000) return false; return true; } diff --git a/src/NzbDrone.Common/Instrumentation/InitializeLogger.cs b/src/NzbDrone.Common/Instrumentation/InitializeLogger.cs new file mode 100644 index 000000000..aa7696204 --- /dev/null +++ b/src/NzbDrone.Common/Instrumentation/InitializeLogger.cs @@ -0,0 +1,28 @@ +using System.Linq; +using NLog; +using NLog.Fluent; +using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Instrumentation.Extensions; +using NzbDrone.Common.Instrumentation.Sentry; + +namespace NzbDrone.Common.Instrumentation +{ + public class InitializeLogger + { + private readonly IOsInfo _osInfo; + + public InitializeLogger(IOsInfo osInfo) + { + _osInfo = osInfo; + } + + public void Initialize() + { + var sentryTarget = LogManager.Configuration.AllTargets.OfType().FirstOrDefault(); + if (sentryTarget != null) + { + sentryTarget.UpdateScope(_osInfo); + } + } + } +} diff --git a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs index bcb01df9b..9830e8ade 100644 --- a/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs +++ b/src/NzbDrone.Common/Instrumentation/NzbDroneLogger.cs @@ -60,18 +60,6 @@ namespace NzbDrone.Common.Instrumentation LogManager.ReconfigExistingLoggers(); } - public static void UnRegisterRemoteLoggers() - { - var sentryRules = LogManager.Configuration.LoggingRules.Where(r => r.Targets.Any(t => t.Name == "sentryTarget")); - - foreach (var rules in sentryRules) - { - rules.Targets.Clear(); - } - - LogManager.ReconfigExistingLoggers(); - } - private static void RegisterLogEntries() { var target = new LogentriesTarget(); @@ -92,15 +80,15 @@ namespace NzbDrone.Common.Instrumentation if (updateClient) { dsn = RuntimeInfo.IsProduction - ? "https://b85aa82c65b84b0e99e3b7c281438357:392b5bc007974147a922c5d841c47cf9@sentry.sonarr.tv/11" - : "https://6168f0946aba4e60ac23e469ac08eac5:bd59e8454ccc454ea27a90cff1f814ca@sentry.sonarr.tv/9"; + ? "https://80777986b95f44a1a90d1eb2f3af1e36@sentry.sonarr.tv/11" + : "https://6168f0946aba4e60ac23e469ac08eac5@sentry.sonarr.tv/9"; } else { dsn = RuntimeInfo.IsProduction - ? "https://a013727b8d224e719894e1e13ff4966b:c95ca1f9ca02418d829db10c2938baf4@sentry.sonarr.tv/8" - : "https://4ee3580e01d8407c96a7430fbc953512:5f2d07227a0b4fde99dea07041a3ff93@sentry.sonarr.tv/10"; + ? "https://e2adcbe52caf46aeaebb6b1dcdfe10a1@sentry.sonarr.tv/8" + : "https://4ee3580e01d8407c96a7430fbc953512@sentry.sonarr.tv/10"; } Target target; @@ -114,6 +102,7 @@ namespace NzbDrone.Common.Instrumentation } catch (Exception ex) { + Console.WriteLine("Failed to load dependency, may need an OS update: " + ex.ToString()); LogManager.GetLogger(nameof(NzbDroneLogger)).Debug(ex, "Failed to load dependency, may need an OS update"); // We still need the logging rules, so use a null target. diff --git a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs index 5866ad8f3..19399c683 100644 --- a/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs +++ b/src/NzbDrone.Common/Instrumentation/Sentry/SentryTarget.cs @@ -1,14 +1,16 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Data.SQLite; using System.Linq; using System.Net; +using System.Reflection; using System.Threading; -using System.Data.SQLite; using NLog; using NLog.Common; using NLog.Targets; using NzbDrone.Common.EnvironmentInfo; +using NzbDrone.Common.Extensions; using Sentry; using Sentry.Protocol; @@ -75,6 +77,7 @@ namespace NzbDrone.Common.Instrumentation.Sentry {LogLevel.Warn, BreadcrumbLevel.Warning}, }; + private readonly DateTime _startTime = DateTime.UtcNow; private readonly IDisposable _sdk; private bool _disposed; @@ -82,10 +85,11 @@ namespace NzbDrone.Common.Instrumentation.Sentry private bool _unauthorized; public bool FilterEvents { get; set; } - public string UpdateBranch { get; set; } public Version DatabaseVersion { get; set; } public int DatabaseMigration { get; set; } + public bool SentryEnabled { get; set; } + public SentryTarget(string dsn) { _sdk = SentrySdk.Init(o => @@ -93,34 +97,71 @@ namespace NzbDrone.Common.Instrumentation.Sentry o.Dsn = new Dsn(dsn); o.AttachStacktrace = true; o.MaxBreadcrumbs = 200; - o.SendDefaultPii = true; + o.SendDefaultPii = false; + o.AttachStacktrace = true; o.Debug = false; o.DiagnosticsLevel = SentryLevel.Debug; o.Release = BuildInfo.Release; + if (PlatformInfo.IsMono) + { + // Mono 6.0 broke GzipStream.WriteAsync + // TODO: Check specific version + o.RequestBodyCompressionLevel = System.IO.Compression.CompressionLevel.NoCompression; + } o.BeforeSend = x => SentryCleanser.CleanseEvent(x); o.BeforeBreadcrumb = x => SentryCleanser.CleanseBreadcrumb(x); + o.Environment = BuildInfo.Branch; }); - SentrySdk.ConfigureScope(scope => - { - scope.User = new User { - Username = HashUtil.AnonymousToken() - }; - - scope.SetTag("osfamily", OsInfo.Os.ToString()); - scope.SetTag("runtime", PlatformInfo.PlatformName); - scope.SetTag("culture", Thread.CurrentThread.CurrentCulture.Name); - scope.SetTag("branch", BuildInfo.Branch); - scope.SetTag("version", BuildInfo.Version.ToString()); - scope.SetTag("production", RuntimeInfo.IsProduction.ToString()); - }); - + InitializeScope(); + _debounce = new SentryDebounce(); // initialize to true and reconfigure later // Otherwise it will default to false and any errors occuring // before config file gets read will not be filtered FilterEvents = true; + + SentryEnabled = true; + } + + public void InitializeScope() + { + SentrySdk.ConfigureScope(scope => + { + scope.User = new User + { + Id = HashUtil.AnonymousToken() + }; + + scope.Contexts.App.Name = BuildInfo.AppName; + scope.Contexts.App.Version = BuildInfo.Version.ToString(); + scope.Contexts.App.StartTime = _startTime; + scope.Contexts.App.Hash = HashUtil.AnonymousToken(); + scope.Contexts.App.Build = BuildInfo.Release; // Git commit cache? + + scope.SetTag("culture", Thread.CurrentThread.CurrentCulture.Name); + scope.SetTag("branch", BuildInfo.Branch); + + if (DatabaseVersion != default(Version)) + { + scope.SetTag("sqlite_version", $"{DatabaseVersion}"); + } + }); + } + + public void UpdateScope(IOsInfo osInfo) + { + SentrySdk.ConfigureScope(scope => + { + if (osInfo.Name != null && PlatformInfo.IsMono) + { + // Sentry auto-detection of non-Windows platforms isn't that accurate on certain devices. + scope.Contexts.OperatingSystem.Name = osInfo.Name.FirstCharToUpper(); + scope.Contexts.OperatingSystem.RawDescription = osInfo.FullName; + scope.Contexts.OperatingSystem.Version = osInfo.Version.ToString(); + } + }); } private void OnError(Exception ex) @@ -246,27 +287,12 @@ namespace NzbDrone.Common.Instrumentation.Sentry { Level = LoggingLevelMap[logEvent.Level], Logger = logEvent.LoggerName, - Message = logEvent.FormattedMessage, - Environment = UpdateBranch + Message = logEvent.FormattedMessage }; sentryEvent.SetExtras(extras); sentryEvent.SetFingerprint(fingerPrint); - // this can't be in the constructor as at that point OsInfo won't have - // populated these values yet - var osName = Environment.GetEnvironmentVariable("OS_NAME"); - var osVersion = Environment.GetEnvironmentVariable("OS_VERSION"); - var runTimeVersion = Environment.GetEnvironmentVariable("RUNTIME_VERSION"); - - sentryEvent.SetTag("os_name", osName); - sentryEvent.SetTag("os_version", $"{osName} {osVersion}"); - sentryEvent.SetTag("runtime_version", $"{PlatformInfo.PlatformName} {runTimeVersion}"); - if (DatabaseVersion != default(Version)) - { - sentryEvent.SetTag("sqlite_version", $"{DatabaseVersion}"); - } - SentrySdk.CaptureEvent(sentryEvent); } catch (Exception e) diff --git a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs index 3f35ee00c..209c0f7fa 100644 --- a/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs +++ b/src/NzbDrone.Core/Configuration/ConfigFileProvider.cs @@ -363,11 +363,6 @@ namespace NzbDrone.Core.Configuration { EnsureDefaultConfigFile(); DeleteOldValues(); - - if (!AnalyticsEnabled) - { - NzbDroneLogger.UnRegisterRemoteLoggers(); - } } public void Execute(ResetApiKeyCommand message) diff --git a/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs b/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs index 9c99dfb02..acd25e57e 100644 --- a/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs +++ b/src/NzbDrone.Core/Instrumentation/ReconfigureLogging.cs @@ -2,7 +2,9 @@ using System.Collections.Generic; using System.Linq; using NLog; using NLog.Config; +using NzbDrone.Common.EnvironmentInfo; using NzbDrone.Common.Extensions; +using NzbDrone.Common.Instrumentation.Sentry; using NzbDrone.Core.Configuration; using NzbDrone.Core.Configuration.Events; using NzbDrone.Core.Messaging.Events; @@ -40,6 +42,9 @@ namespace NzbDrone.Core.Instrumentation SetMinimumLogLevel(rules, "appFileDebug", minimumLogLevel <= LogLevel.Debug ? LogLevel.Debug : LogLevel.Off); SetMinimumLogLevel(rules, "appFileTrace", minimumLogLevel <= LogLevel.Trace ? LogLevel.Trace : LogLevel.Off); + //Sentry + ReconfigureSentry(); + LogManager.ReconfigExistingLoggers(); } @@ -67,6 +72,15 @@ namespace NzbDrone.Core.Instrumentation } } + private void ReconfigureSentry() + { + var sentryTarget = LogManager.Configuration.AllTargets.OfType().FirstOrDefault(); + if (sentryTarget != null) + { + sentryTarget.SentryEnabled = RuntimeInfo.IsProduction && _configFileProvider.AnalyticsEnabled || RuntimeInfo.IsDevelopment; + } + } + private List GetLogLevels() { return new List diff --git a/src/NzbDrone.Core/Parser/ParsingService.cs b/src/NzbDrone.Core/Parser/ParsingService.cs index 6d29df534..a7920ec4a 100644 --- a/src/NzbDrone.Core/Parser/ParsingService.cs +++ b/src/NzbDrone.Core/Parser/ParsingService.cs @@ -247,6 +247,8 @@ namespace NzbDrone.Core.Parser { _logger.Debug() .Message("Found matching series by TVDB ID {0}, an alias may be need for: {1}", tvdbId, parsedEpisodeInfo.SeriesTitle) + .Property("TvdbId", tvdbId) + .Property("ParsedEpisodeInfo", parsedEpisodeInfo) .WriteSentryWarn("TvdbIdMatch", tvdbId.ToString(), parsedEpisodeInfo.SeriesTitle) .Write(); @@ -256,8 +258,10 @@ namespace NzbDrone.Core.Parser if (tvRageId > 0 && tvRageId == searchCriteria.Series.TvRageId) { _logger.Debug() - .Message("Found matching series by TVRage ID {0}, an alias may be need for: {1}", tvdbId, parsedEpisodeInfo.SeriesTitle) - .WriteSentryWarn("TvRageIdMatch", tvdbId.ToString(), parsedEpisodeInfo.SeriesTitle) + .Message("Found matching series by TVRage ID {0}, an alias may be need for: {1}", tvRageId, parsedEpisodeInfo.SeriesTitle) + .Property("TvRageId", tvRageId) + .Property("ParsedEpisodeInfo", parsedEpisodeInfo) + .WriteSentryWarn("TvRageIdMatch", tvRageId.ToString(), parsedEpisodeInfo.SeriesTitle) .Write(); return searchCriteria.Series; @@ -279,6 +283,8 @@ namespace NzbDrone.Core.Parser { _logger.Debug() .Message("Found matching series by TVDB ID {0}, an alias may be need for: {1}", tvdbId, parsedEpisodeInfo.SeriesTitle) + .Property("TvdbId", tvdbId) + .Property("ParsedEpisodeInfo", parsedEpisodeInfo) .WriteSentryWarn("TvdbIdMatch", tvdbId.ToString(), parsedEpisodeInfo.SeriesTitle) .Write(); } @@ -292,7 +298,9 @@ namespace NzbDrone.Core.Parser { _logger.Debug() .Message("Found matching series by TVRage ID {0}, an alias may be need for: {1}", tvdbId, parsedEpisodeInfo.SeriesTitle) - .WriteSentryWarn("TvRageIdMatch", tvdbId.ToString(), parsedEpisodeInfo.SeriesTitle) + .Property("TvRageId", tvRageId) + .Property("ParsedEpisodeInfo", parsedEpisodeInfo) + .WriteSentryWarn("TvRageIdMatch", tvRageId.ToString(), parsedEpisodeInfo.SeriesTitle) .Write(); } } diff --git a/src/NzbDrone.Host/Bootstrap.cs b/src/NzbDrone.Host/Bootstrap.cs index dc6e50753..c3e3e85f9 100644 --- a/src/NzbDrone.Host/Bootstrap.cs +++ b/src/NzbDrone.Host/Bootstrap.cs @@ -32,6 +32,7 @@ namespace NzbDrone.Host LongPathSupport.Enable(); _container = MainAppContainerBuilder.BuildContainer(startupContext); + _container.Resolve().Initialize(); _container.Resolve().Register(); _container.Resolve().Write(); diff --git a/src/NzbDrone.Mono/EnvironmentInfo/MonoPlatformInfo.cs b/src/NzbDrone.Mono/EnvironmentInfo/MonoPlatformInfo.cs index e883cea94..e85540dfa 100644 --- a/src/NzbDrone.Mono/EnvironmentInfo/MonoPlatformInfo.cs +++ b/src/NzbDrone.Mono/EnvironmentInfo/MonoPlatformInfo.cs @@ -30,7 +30,6 @@ namespace NzbDrone.Mono.EnvironmentInfo if (versionMatch.Success) { runTimeVersion = new Version(versionMatch.Groups["version"].Value); - Environment.SetEnvironmentVariable("RUNTIME_VERSION", runTimeVersion.ToString()); } } } diff --git a/src/NzbDrone.Update/UpdateApp.cs b/src/NzbDrone.Update/UpdateApp.cs index 928bbb865..f72b6b148 100644 --- a/src/NzbDrone.Update/UpdateApp.cs +++ b/src/NzbDrone.Update/UpdateApp.cs @@ -35,7 +35,7 @@ namespace NzbDrone.Update Logger.Info("Starting Sonarr Update Client"); _container = UpdateContainerBuilder.Build(startupContext); - + _container.Resolve().Initialize(); _container.Resolve().Start(args); Logger.Info("Update completed successfully"); diff --git a/src/NzbDrone.Windows/EnvironmentInfo/DotNetPlatformInfo.cs b/src/NzbDrone.Windows/EnvironmentInfo/DotNetPlatformInfo.cs index 561acb3ac..f05cba7bb 100644 --- a/src/NzbDrone.Windows/EnvironmentInfo/DotNetPlatformInfo.cs +++ b/src/NzbDrone.Windows/EnvironmentInfo/DotNetPlatformInfo.cs @@ -13,7 +13,6 @@ namespace NzbDrone.Windows.EnvironmentInfo { _logger = logger; var version = GetFrameworkVersion(); - Environment.SetEnvironmentVariable("RUNTIME_VERSION", version.ToString()); Version = version; }