Skip to content

Commit

Permalink
Log the right framework description
Browse files Browse the repository at this point in the history
Use the RuntimeInformation to log the right FrameworkDescription to avoid writing .NET Framework when actually running .NET Core
  • Loading branch information
Jogge authored and phatboyg committed Dec 5, 2020
1 parent 23adc30 commit 94674fb
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ public Host CreateHost()
{
Type type = typeof(HostFactory);
HostLogger.Get<HostConfiguratorImpl>()
.InfoFormat("{0} v{1}, .NET Framework v{2}", type.Namespace, type.Assembly.GetName().Version,
Environment.Version);
.InfoFormat("{0} v{1}, {2} ({3})", type.Namespace, type.Assembly.GetName().Version,
RuntimeInformation.FrameworkDescription, Environment.Version);

EnvironmentBuilder environmentBuilder = _environmentBuilderFactory(this);

Expand Down Expand Up @@ -259,4 +259,4 @@ static EnvironmentBuilder DefaultEnvironmentBuilderFactory(HostConfigurator conf
return new WindowsHostEnvironmentBuilder(configurator);
}
}
}
}

0 comments on commit 94674fb

Please sign in to comment.