From 9c011fda7b1d3a8858f97ed20b0b30e283824ee1 Mon Sep 17 00:00:00 2001 From: Vladimir Pecanac Date: Sun, 1 Nov 2026 13:23:19 +0100 Subject: [PATCH] Update .NET version sample to .NET 10 and fix the SDK and runtime parsers Retarget all three projects to net10.0 and update the test packages. Split the dotnet --list-sdks and --list-runtimes lines on the first one or two spaces so install paths with spaces parse, dispose the Process, build the demo's assembly path from AppContext.BaseDirectory, and drop the Live suffix from the test classes so CI runs them. --- .../DotNetCoreVersion.cs | 5 +- .../DotNetRuntimeVersion.cs | 4 +- .../DotNetSdkVersion.cs | 4 +- ...termineDotNetVersionProgramatically.csproj | 2 +- ...ineDotNetVersionProgramaticallyDemo.csproj | 2 +- .../Program.cs | 66 +++++-------------- ...Tests.cs => DotNetAssemblyVersionTests.cs} | 6 +- ...nLiveTests.cs => DotNetClrVersionTests.cs} | 6 +- ...LiveTests.cs => DotNetCoreVersionTests.cs} | 4 +- ....cs => DotNetFrameworkDescriptionTests.cs} | 4 +- ...eTests.cs => DotNetRuntimeVersionTests.cs} | 2 +- ...nLiveTests.cs => DotNetSdkVersionTests.cs} | 2 +- ...s.cs => DotNetTargetFrameworkNameTests.cs} | 2 +- ...neDotNetVersionProgramaticallyTests.csproj | 10 +-- 14 files changed, 44 insertions(+), 75 deletions(-) rename csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/{DotNetAssemblyVersionLiveTests.cs => DotNetAssemblyVersionTests.cs} (71%) rename csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/{DotNetClrVersionLiveTests.cs => DotNetClrVersionTests.cs} (83%) rename csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/{DotNetCoreVersionLiveTests.cs => DotNetCoreVersionTests.cs} (83%) rename csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/{DotNetFrameworkDescriptionLiveTests.cs => DotNetFrameworkDescriptionTests.cs} (80%) rename csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/{DotNetRuntimeVersionLiveTests.cs => DotNetRuntimeVersionTests.cs} (94%) rename csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/{DotNetSdkVersionLiveTests.cs => DotNetSdkVersionTests.cs} (94%) rename csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/{DotNetTargetFrameworkNameLiveTests.cs => DotNetTargetFrameworkNameTests.cs} (95%) diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetCoreVersion.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetCoreVersion.cs index a3870a9fea..8625e07406 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetCoreVersion.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetCoreVersion.cs @@ -1,4 +1,3 @@ -using System.Reflection; using System.Runtime; namespace HowToDetermineDotNetVersionProgramatically; @@ -7,8 +6,8 @@ public static class DotNetCoreVersion { public static string GetNetCoreVersion() { - var assembly = typeof(GCSettings).GetTypeInfo().Assembly; - var assemblyPath = assembly.Location.Split(new[] {'/', '\\'}, StringSplitOptions.RemoveEmptyEntries); + var assembly = typeof(GCSettings).Assembly; + var assemblyPath = assembly.Location.Split(['/', '\\'], StringSplitOptions.RemoveEmptyEntries); var netCoreAppIndex = Array.IndexOf(assemblyPath, "Microsoft.NETCore.App"); if (netCoreAppIndex > 0 && netCoreAppIndex < assemblyPath.Length - 2) diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetRuntimeVersion.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetRuntimeVersion.cs index 106d2ac8a3..a9f980f6a1 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetRuntimeVersion.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetRuntimeVersion.cs @@ -4,7 +4,7 @@ public static class DotNetRuntimeVersion { public static string GetDotNetRuntimeVersionsInstalled() { - var process = new Process(); + using var process = new Process(); process.StartInfo.FileName = "dotnet"; process.StartInfo.Arguments = "--list-runtimes"; process.StartInfo.RedirectStandardOutput = true; @@ -20,7 +20,7 @@ public static string GetDotNetRuntimeVersionsInstalled() { return GetDotNetRuntimeVersionsInstalled() .Split(Environment.NewLine) - .Select(x => x.Split(' ')) + .Select(x => x.Split(' ', 3)) .Where(x => x.Length == 3) .Select(x => (name: x[0], version: x[1], installPath: x[2])) .ToArray(); diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetSdkVersion.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetSdkVersion.cs index 10d04fafe4..38b70ec056 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetSdkVersion.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/DotNetSdkVersion.cs @@ -4,7 +4,7 @@ public static class DotNetSdkVersion { public static string GetDotNetSdkVersionsInstalled() { - var process = new Process(); + using var process = new Process(); process.StartInfo.FileName = "dotnet"; process.StartInfo.Arguments = "--list-sdks"; process.StartInfo.RedirectStandardOutput = true; @@ -19,7 +19,7 @@ public static string GetDotNetSdkVersionsInstalled() { return GetDotNetSdkVersionsInstalled() .Split(Environment.NewLine) - .Select(x => x.Split(' ')) + .Select(x => x.Split(' ', 2)) .Where(x => x.Length == 2) .Select(x => (version: x[0], installPath: x[1])) .ToArray(); diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically.csproj b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically.csproj index 6836c6808f..e0ad4b5540 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically.csproj +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramatically.csproj @@ -1,7 +1,7 @@ - net7.0 + net10.0 enable enable diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyDemo/HowToDetermineDotNetVersionProgramaticallyDemo.csproj b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyDemo/HowToDetermineDotNetVersionProgramaticallyDemo.csproj index 16fbae05c9..da722a083b 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyDemo/HowToDetermineDotNetVersionProgramaticallyDemo.csproj +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyDemo/HowToDetermineDotNetVersionProgramaticallyDemo.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net10.0 enable enable diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyDemo/Program.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyDemo/Program.cs index e7acbecd92..060fe780ad 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyDemo/Program.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyDemo/Program.cs @@ -6,11 +6,6 @@ using static HowToDetermineDotNetVersionProgramatically.DotNetRuntimeVersion; using static HowToDetermineDotNetVersionProgramatically.DotNetSdkVersion; -var path = "HowToDetermineDotNetVersionProgramaticallyDemo.dll"; -Console.WriteLine(GetAssemblyDotNetVersion(path)); - -Console.WriteLine(GetTargetFrameworkName()); - Console.WriteLine(GetEnvironmentVersion()); Console.WriteLine(GetFrameworkDescription()); @@ -20,64 +15,39 @@ var versionPart = parts[1]; Console.WriteLine(versionPart); +Console.WriteLine(GetTargetFrameworkName()); + +var path = Path.Combine(AppContext.BaseDirectory, "HowToDetermineDotNetVersionProgramaticallyDemo.dll"); +Console.WriteLine(GetAssemblyDotNetVersion(path)); + Console.WriteLine(GetNetCoreVersion()); Console.WriteLine(GetDotNetSdkVersionsInstalled()); -static ICollection<(string version, string installPath)> GetInstalledSdkVersionsCollection() -{ - return GetDotNetSdkVersionsInstalled() - .Split(Environment.NewLine) - .Select(x => x.Split(' ')) - .Where(x => x.Length == 2) - .Select(x => (version: x[0], installPath: x[1])) - .ToArray(); -} -foreach (var (sdkVersion, installPath) in GetInstalledSdkVersionsCollection()) +foreach (var (sdkVersion, installPath) in GetInstalledSdkVersions()) { Console.WriteLine($"SDK version: {sdkVersion} Install path: {installPath}"); } Console.WriteLine(GetDotNetRuntimeVersionsInstalled()); -static ICollection<(string name, string version, string installPath)> - GetInstalledDotNetRuntimeVersionsCollection() -{ - return GetDotNetRuntimeVersionsInstalled() - .Split(Environment.NewLine) - .Select(x => x.Split(' ')) - .Where(x => x.Length == 3) - .Select(x => (name: x[0], version: x[1], installPath: x[2])) - .ToArray(); -} -foreach (var (name, version, installPath) in GetInstalledDotNetRuntimeVersionsCollection()) +foreach (var (name, version, installPath) in GetInstalledDotNetRuntimeVersions()) { Console.WriteLine($"Runtime name: {name} Version: {version} Install path: {installPath}"); } -Console.ReadLine(); - -// output -// 7.0.0.0 -// .NETCoreApp,Version=v7.0 -// 7.0.0 -// .NET 7.0.0 +// output on .NET 10.0.10, Windows +// 10.0.10 +// .NET 10.0.10 // .NET -// 7.0.0 -// 7.0.0 - -// ... -// 7.0.100 [/usr/local/share/dotnet/sdk] +// 10.0.10 +// .NETCoreApp,Version=v10.0 +// 10.0.0.0 +// 10.0.10 // ... - -// ... -// SDK version: 7.0.100 Install path: [/usr/local/share/dotnet/sdk] +// 10.0.302 [C:\Program Files\dotnet\sdk] // ... - +// SDK version: 10.0.302 Install path: [C:\Program Files\dotnet\sdk] // ... -// Microsoft.NETCore.App 7.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] -// ... - +// Microsoft.NETCore.App 10.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] // ... -// Runtime name: Microsoft.NETCore.App -// Version: 7.0.1 -// Install path: [/usr/local/share/dotnet/shared/Microsoft.NETCore.App] +// Runtime name: Microsoft.NETCore.App Version: 10.0.10 Install path: [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] // ... diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetAssemblyVersionLiveTests.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetAssemblyVersionTests.cs similarity index 71% rename from csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetAssemblyVersionLiveTests.cs rename to csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetAssemblyVersionTests.cs index 24424519f9..b3048e4e78 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetAssemblyVersionLiveTests.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetAssemblyVersionTests.cs @@ -1,13 +1,13 @@ namespace HowToDetermineDotNetVersionProgramaticallyTests; -public class DotNetAssemblyVersionLiveTests +public class DotNetAssemblyVersionTests { [Fact] public void GivenPathToDllBuiltWithDotNet_WhenCallingGetAssemblyDotNetVersion_ThenReturnExpectedVersion() { // Given - var path = typeof(DotNetAssemblyVersionLiveTests).Assembly.Location; - var expectedVersion = "7.0"; + var path = typeof(DotNetAssemblyVersionTests).Assembly.Location; + var expectedVersion = "10.0"; // When var actualVersion = DotNetAssemblyVersion.GetAssemblyDotNetVersion(path); diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetClrVersionLiveTests.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetClrVersionTests.cs similarity index 83% rename from csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetClrVersionLiveTests.cs rename to csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetClrVersionTests.cs index 6501a1c0cf..14286f13dd 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetClrVersionLiveTests.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetClrVersionTests.cs @@ -1,12 +1,12 @@ namespace HowToDetermineDotNetVersionProgramaticallyTests; -public class DotNetClrVersionLiveTests +public class DotNetClrVersionTests { [Fact] public void GivenAssemblyBuiltWithDotNet_WhenCallingGetEnvironmentVersion_ThenReturnVersion() { // Given - var expectedVersion = "7.0"; + var expectedVersion = "10.0"; // When var actualVersion = DotNetClrVersion.GetEnvironmentVersion(); @@ -19,7 +19,7 @@ public void GivenAssemblyBuiltWithDotNet_WhenCallingGetEnvironmentVersion_ThenRe public void GivenPathToDllBuiltWithDotNet_WhenCallingGetAssemblySupportedMinimumClrVersion_ThenReturnExpectedVersion() { // Given - var path = typeof(DotNetClrVersionLiveTests).Assembly.Location; + var path = typeof(DotNetClrVersionTests).Assembly.Location; var expectedVersion = "v4.0"; // When diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetCoreVersionLiveTests.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetCoreVersionTests.cs similarity index 83% rename from csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetCoreVersionLiveTests.cs rename to csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetCoreVersionTests.cs index 33aa8b8a69..a6f001985a 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetCoreVersionLiveTests.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetCoreVersionTests.cs @@ -1,12 +1,12 @@ namespace HowToDetermineDotNetVersionProgramaticallyTests; -public class DotNetCoreVersionLiveTests +public class DotNetCoreVersionTests { [Fact] public void GivenCurrentProcessGarbageCollectionSettings_WhenCallingGetNetCoreVersion_ThenReturnExpectedVersion() { // Given - var expectedVersion = "7.0"; + var expectedVersion = "10.0"; // When var actualVersion = DotNetCoreVersion.GetNetCoreVersion(); diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetFrameworkDescriptionLiveTests.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetFrameworkDescriptionTests.cs similarity index 80% rename from csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetFrameworkDescriptionLiveTests.cs rename to csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetFrameworkDescriptionTests.cs index 628fc96a0a..d2ea966130 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetFrameworkDescriptionLiveTests.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetFrameworkDescriptionTests.cs @@ -1,12 +1,12 @@ namespace HowToDetermineDotNetVersionProgramaticallyTests; -public class DotNetFrameworkDescriptionLiveTests +public class DotNetFrameworkDescriptionTests { [Fact] public void GivenAssemblyBuiltWithDotNet_WhenCallingGetFrameworkDescription_ThenReturnDescription() { // Given - var expectedDescription = ".NET 7."; + var expectedDescription = ".NET 10."; // When var actualDescription = DotNetFrameworkDescription.GetFrameworkDescription(); diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetRuntimeVersionLiveTests.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetRuntimeVersionTests.cs similarity index 94% rename from csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetRuntimeVersionLiveTests.cs rename to csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetRuntimeVersionTests.cs index 92df4dd1ec..ba1d548971 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetRuntimeVersionLiveTests.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetRuntimeVersionTests.cs @@ -1,6 +1,6 @@ namespace HowToDetermineDotNetVersionProgramaticallyTests; -public class DotNetRuntimeVersionLiveTests +public class DotNetRuntimeVersionTests { [Fact] public void diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetSdkVersionLiveTests.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetSdkVersionTests.cs similarity index 94% rename from csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetSdkVersionLiveTests.cs rename to csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetSdkVersionTests.cs index 37c6782fe8..0b54a34efe 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetSdkVersionLiveTests.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetSdkVersionTests.cs @@ -1,6 +1,6 @@ namespace HowToDetermineDotNetVersionProgramaticallyTests; -public class DotNetSdkVersionLiveTests +public class DotNetSdkVersionTests { [Fact] public void GivenPlatformWithInstalledDotNetSdks_WhenCallingGetDotNetSdkVersionsInstalled_ThenReturnInstalledSdks() diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetTargetFrameworkNameLiveTests.cs b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetTargetFrameworkNameTests.cs similarity index 95% rename from csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetTargetFrameworkNameLiveTests.cs rename to csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetTargetFrameworkNameTests.cs index e7770bdd35..0368715378 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetTargetFrameworkNameLiveTests.cs +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/DotNetTargetFrameworkNameTests.cs @@ -1,6 +1,6 @@ namespace HowToDetermineDotNetVersionProgramaticallyTests; -public class DotNetTargetFrameworkNameLiveTests +public class DotNetTargetFrameworkNameTests { /* for use in library build on .NET Framework [Fact] diff --git a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/HowToDetermineDotNetVersionProgramaticallyTests.csproj b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/HowToDetermineDotNetVersionProgramaticallyTests.csproj index eec177d094..374d1b5854 100644 --- a/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/HowToDetermineDotNetVersionProgramaticallyTests.csproj +++ b/csharp-intermediate-topics/HowToDetermineDotNetVersionProgramatically/HowToDetermineDotNetVersionProgramaticallyTests/HowToDetermineDotNetVersionProgramaticallyTests.csproj @@ -1,7 +1,7 @@ - net7.0 + net10.0 enable enable @@ -10,13 +10,13 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all