From 32c38d3907571ac6fcd0c7a7ea3e11ea7b486637 Mon Sep 17 00:00:00 2001 From: Erik Ejlskov Jensen Date: Fri, 22 Dec 2023 14:16:53 +0100 Subject: [PATCH] Make check more robust --- src/GUI/Shared/Extensions/ProjectExtensions.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/GUI/Shared/Extensions/ProjectExtensions.cs b/src/GUI/Shared/Extensions/ProjectExtensions.cs index 32787cce0..0120f0b2c 100644 --- a/src/GUI/Shared/Extensions/ProjectExtensions.cs +++ b/src/GUI/Shared/Extensions/ProjectExtensions.cs @@ -411,7 +411,12 @@ private static bool IsNet80(string targetFrameworkMonikers) private static bool FrameworkCheck(string targetFrameworkMonikers, string version) { - return targetFrameworkMonikers?.Contains($".NETCoreApp,Version=v{version}.0") ?? false; + if (string.IsNullOrEmpty(targetFrameworkMonikers)) + { + return false; + } + + return targetFrameworkMonikers.IndexOf($".NETCoreApp,Version=v{version}.0", StringComparison.OrdinalIgnoreCase) >= 0; } private static async Task GetOutputPathAsync(Project project)