Install an 8.0 runtime

Enable the 8.0 default templates
This commit is contained in:
Marc Paine 2023-09-22 16:14:33 -07:00
parent 48a7320a41
commit a9c90a59a1
2 changed files with 20 additions and 1 deletions

View file

@ -424,8 +424,26 @@ namespace EndToEnd.Tests
string[] runtimeFolders = Directory.GetDirectories(Path.Combine(dotnetFolder, "shared", "Microsoft.NETCore.App"));
int latestMajorVersion = runtimeFolders.Select(folder => int.Parse(Path.GetFileName(folder).Split('.').First())).Max();
if (latestMajorVersion == 8)
if (latestMajorVersion == 9)
{
// TODO: This block need to be updated when every template updates their default tfm.
// Currently winforms updated their default templates target but not others.
if (template.StartsWith("mstest")
|| template.StartsWith("winforms")
|| template.StartsWith("wpf")
|| template.StartsWith("web")
|| template.StartsWith("razor")
|| template.StartsWith("blazor")
|| template.StartsWith("mvc")
|| template.StartsWith("worker")
|| template.StartsWith("grpc")
|| template.StartsWith("classlib")
|| template.StartsWith("console")
|| template.StartsWith("nunit")
|| template.StartsWith("xunit"))
{
return $"net8.0";
}
return $"net{latestMajorVersion}.0";
}

View file

@ -64,6 +64,7 @@
<RuntimeVersionToInstall Include="5.0.0" />
<RuntimeVersionToInstall Include="6.0.0" />
<RuntimeVersionToInstall Include="7.0.0" />
<RuntimeVersionToInstall Include="8.0.0-rc.2.23457.7" />
</ItemGroup>
</Target>