Skip to content

Commit

Permalink
Add ReferenceAssemblies.Net.Net60
Browse files Browse the repository at this point in the history
  • Loading branch information
sharwell committed Jul 22, 2021
1 parent 6334343 commit de9af89
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ static Microsoft.CodeAnalysis.Testing.DiagnosticResult.CompilerWarning(string id
static Microsoft.CodeAnalysis.Testing.IVerifierExtensions.EqualOrDiff(this Microsoft.CodeAnalysis.Testing.IVerifier verifier, string expected, string actual, string message = null) -> void
static Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.Default.get -> Microsoft.CodeAnalysis.Testing.ReferenceAssemblies
static Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.Net.Net50.get -> Microsoft.CodeAnalysis.Testing.ReferenceAssemblies
static Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.Net.Net60.get -> Microsoft.CodeAnalysis.Testing.ReferenceAssemblies
static Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.NetCore.NetCoreApp10.get -> Microsoft.CodeAnalysis.Testing.ReferenceAssemblies
static Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.NetCore.NetCoreApp11.get -> Microsoft.CodeAnalysis.Testing.ReferenceAssemblies
static Microsoft.CodeAnalysis.Testing.ReferenceAssemblies.NetCore.NetCoreApp20.get -> Microsoft.CodeAnalysis.Testing.ReferenceAssemblies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,26 @@ public static class Net
Path.Combine("ref", "net5.0"));
});

private static readonly Lazy<ReferenceAssemblies> _lazyNet60 =
new Lazy<ReferenceAssemblies>(() =>
{
if (!NuGetFramework.Parse("net6.0").IsPackageBased)
{
// The NuGet version provided at runtime does not recognize the 'net6.0' target framework
throw new NotSupportedException("The 'net6.0' target framework is not supported by this version of NuGet.");
}

return new ReferenceAssemblies(
"net6.0",
new PackageIdentity(
"Microsoft.NETCore.App.Ref",
"6.0.0-preview.6.21352.12"),
Path.Combine("ref", "net6.0"));
});

public static ReferenceAssemblies Net50 => _lazyNet50.Value;

public static ReferenceAssemblies Net60 => _lazyNet60.Value;
}

public static class NetStandard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ public async Task ResolveReferenceAssemblies_Net50()
[InlineData("netcoreapp3.1")]
#if !(NETCOREAPP1_1 || NET46)
[InlineData("net5.0")]
[InlineData("net6.0")]
#endif
[InlineData("netstandard1.0")]
[InlineData("netstandard1.1")]
Expand Down Expand Up @@ -500,6 +501,7 @@ internal static ReferenceAssemblies ReferenceAssembliesForTargetFramework(string
"netcoreapp3.0" => ReferenceAssemblies.NetCore.NetCoreApp30,
"netcoreapp3.1" => ReferenceAssemblies.NetCore.NetCoreApp31,
"net5.0" => ReferenceAssemblies.Net.Net50,
"net6.0" => ReferenceAssemblies.Net.Net60,
"netstandard1.0" => ReferenceAssemblies.NetStandard.NetStandard10,
"netstandard1.1" => ReferenceAssemblies.NetStandard.NetStandard11,
"netstandard1.2" => ReferenceAssemblies.NetStandard.NetStandard12,
Expand Down

0 comments on commit de9af89

Please sign in to comment.