From dfb1e63d862fe2daf3799ad95ba9073abc2c8176 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Thu, 21 Sep 2023 13:33:51 -0700 Subject: [PATCH] fix: always allow generator tools to roll forward to latest SDK --- src/Cli.Common.props | 3 +++ src/IntelliTect.Coalesce.DotnetTool/Program.cs | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Cli.Common.props b/src/Cli.Common.props index 7a5ae6247..d66ab47e6 100644 --- a/src/Cli.Common.props +++ b/src/Cli.Common.props @@ -6,6 +6,9 @@ .NET Core command-line tooling for IntelliTect.Coalesce code generation Exe + + + LatestMinor diff --git a/src/IntelliTect.Coalesce.DotnetTool/Program.cs b/src/IntelliTect.Coalesce.DotnetTool/Program.cs index 270a5c88a..aec6fd963 100644 --- a/src/IntelliTect.Coalesce.DotnetTool/Program.cs +++ b/src/IntelliTect.Coalesce.DotnetTool/Program.cs @@ -50,12 +50,12 @@ private async Task OnExecuteAsync(CommandLineApplication app) // Get the target framework (e.g. ".NETCoreApp,Version=v2.0") that Coalesce was compiled against. // I added this originally for debugging, but its kinda nice to show regardless. - var attr = Assembly.GetEntryAssembly().GetCustomAttribute(); + var frameworkVersion = System.Runtime.InteropServices.RuntimeInformation.FrameworkDescription; // This reflects the version of the nuget package. string version = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).ProductVersion; - Console.WriteLine($"Starting Coalesce {version}, running under {attr.FrameworkName}"); + Console.WriteLine($"Starting Coalesce {version}, running under {frameworkVersion}"); Console.WriteLine("https://github.com/IntelliTect/Coalesce"); Console.WriteLine();