Skip to content

Commit c547aea

Browse files
fix: Manually Pin Microsoft.NETCore.App.Ref version for .net 6.0 runtime (#798)
Pin Ref Version for net6.0 package as there is not an associated 6.0.37 version available at this time (https://www.nuget.org/packages/Microsoft.NETCore.App.Ref/6.0.36) However our runners appear to have that version of the runtime available: ![image](https://github.com/user-attachments/assets/4a22bd43-3f92-4895-805f-789fea277423)
1 parent 7032b47 commit c547aea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Shared/Tests/CompilerAssert.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Microsoft.CodeAnalysis;
1+
using Microsoft.CodeAnalysis;
22
using Microsoft.CodeAnalysis.CSharp;
33
using Microsoft.CodeAnalysis.Diagnostics;
44
using Microsoft.CodeAnalysis.Testing;
@@ -41,11 +41,11 @@ public static async Task CompileAsync(string[] fileNames, string[] expectedError
4141
{
4242
CompilerDiagnostics = CompilerDiagnostics.Warnings,
4343
ReferenceAssemblies = new ReferenceAssemblies(
44-
$"net{Environment.Version.Major}.{Environment.Version.Minor}",
44+
Environment.Version.Major == 6 ? "net6.0" : $"net{Environment.Version.Major}.{Environment.Version.Minor}",
4545
new PackageIdentity(
4646
"Microsoft.NETCore.App.Ref",
47-
NetCore.GetNetCoreVersion()),
48-
Path.Combine("ref", $"net{Environment.Version.Major}.{Environment.Version.Minor}"))
47+
Environment.Version.Major == 6 ? "6.0.36" : NetCore.GetNetCoreVersion()),
48+
Path.Combine("ref", Environment.Version.Major == 6 ? "net6.0" : $"net{Environment.Version.Major}.{Environment.Version.Minor}"))
4949
};
5050

5151
List<string> fileNamesToCompile = new();

0 commit comments

Comments
 (0)