From 30964ce86883effd9a2a2cc86315a8d52784e40a Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Tue, 18 Feb 2025 16:09:09 -0800 Subject: [PATCH] Change net6.0 logic --- src/Shared/Tests/CompilerAssert.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Shared/Tests/CompilerAssert.cs b/src/Shared/Tests/CompilerAssert.cs index fdb0d7e9..d27f7cd8 100644 --- a/src/Shared/Tests/CompilerAssert.cs +++ b/src/Shared/Tests/CompilerAssert.cs @@ -1,4 +1,4 @@ -using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Diagnostics; using Microsoft.CodeAnalysis.Testing; @@ -41,11 +41,11 @@ public static async Task CompileAsync(string[] fileNames, string[] expectedError { CompilerDiagnostics = CompilerDiagnostics.Warnings, ReferenceAssemblies = new ReferenceAssemblies( - $"net{Environment.Version.Major}.{Environment.Version.Minor}", + Environment.Version.Major == 6 ? "net6.0" : $"net{Environment.Version.Major}.{Environment.Version.Minor}", new PackageIdentity( "Microsoft.NETCore.App.Ref", - NetCore.GetNetCoreVersion()), - Path.Combine("ref", $"net{Environment.Version.Major}.{Environment.Version.Minor}")) + Environment.Version.Major == 6 ? "6.0.36" : NetCore.GetNetCoreVersion()), + Path.Combine("ref", Environment.Version.Major == 6 ? "net6.0" : $"net{Environment.Version.Major}.{Environment.Version.Minor}")) }; List fileNamesToCompile = new();