diff --git a/src/Microsoft.AspNetCore.Hosting/Startup/StartupExceptionPage.cs b/src/Microsoft.AspNetCore.Hosting/Startup/StartupExceptionPage.cs index eb06f9388e..32fac13137 100644 --- a/src/Microsoft.AspNetCore.Hosting/Startup/StartupExceptionPage.cs +++ b/src/Microsoft.AspNetCore.Hosting/Startup/StartupExceptionPage.cs @@ -247,26 +247,10 @@ namespace Microsoft.AspNetCore.Hosting var currentAssemblyVersion = currentAssembly.GetCustomAttribute().InformationalVersion; currentAssemblyVersion = HtmlEncodeAndReplaceLineBreaks(currentAssemblyVersion); - var osName = string.Empty; - var osVersion = string.Empty; - if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) - { - osName = OSPlatform.Windows.ToString(); - osVersion = Microsoft.Extensions.Internal.RuntimeEnvironment.OperatingSystemVersion; - } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - osName = OSPlatform.Linux.ToString(); - } - else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) - { - osName = OSPlatform.OSX.ToString(); - } - var os = HtmlEncodeAndReplaceLineBreaks(osName); - osVersion = HtmlEncodeAndReplaceLineBreaks(osVersion); + var osDescription = HtmlEncodeAndReplaceLineBreaks(RuntimeInformation.OSDescription); return string.Format(CultureInfo.InvariantCulture, _errorFooterFormatString, runtimeDisplayName, runtimeArch, clrVersion, - currentAssemblyVersion, os, osVersion); + currentAssemblyVersion, osDescription); } private static string HtmlEncodeAndReplaceLineBreaks(string input) diff --git a/src/Microsoft.AspNetCore.Hosting/compiler/resources/GenericError_Footer.html b/src/Microsoft.AspNetCore.Hosting/compiler/resources/GenericError_Footer.html index 7a90dbff40..fe54861d87 100644 --- a/src/Microsoft.AspNetCore.Hosting/compiler/resources/GenericError_Footer.html +++ b/src/Microsoft.AspNetCore.Hosting/compiler/resources/GenericError_Footer.html @@ -1,3 +1,3 @@