Insert net9.0 test templates (#17745)

This commit is contained in:
Codrin-Victor Poienaru 2023-11-09 18:52:19 +01:00 committed by GitHub
parent 3669cc95e9
commit 00178e6f21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 11 deletions

View file

@ -119,6 +119,10 @@
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>bd5b705548be896c84c672e2f7a033ed0881f8b7</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Test.ProjectTemplates.9.0" Version="1.1.0-rc.23558.2">
<Uri>https://github.com/dotnet/test-templates</Uri>
<Sha>bd5b705548be896c84c672e2f7a033ed0881f8b7</Sha>
</Dependency>
<!-- For coherency purposes, these versions should be gated by the versions of winforms and wpf routed via windowsdesktop -->
<Dependency Name="Microsoft.Dotnet.WinForms.ProjectTemplates" Version="9.0.0-alpha.1.23557.11" CoherentParentDependency="Microsoft.WindowsDesktop.App.Runtime.win-x64">
<Uri>https://github.com/dotnet/winforms</Uri>

View file

@ -58,12 +58,13 @@
<!-- Legacy versions -->
<MicrosoftDotNetTestProjectTemplates21PackageVersion>1.0.2-beta4.22406.1</MicrosoftDotNetTestProjectTemplates21PackageVersion>
<MicrosoftDotNetTestProjectTemplates30PackageVersion>1.0.2-beta4.22406.1</MicrosoftDotNetTestProjectTemplates30PackageVersion>
<!-- Supported versions -->
<MicrosoftDotNetTestProjectTemplates31PackageVersion>1.1.0-rc.22558.1</MicrosoftDotNetTestProjectTemplates31PackageVersion>
<MicrosoftDotNetTestProjectTemplates50PackageVersion>1.1.0-rc.23558.1</MicrosoftDotNetTestProjectTemplates50PackageVersion>
<!-- Supported versions -->
<MicrosoftDotNetTestProjectTemplates60PackageVersion>1.1.0-rc.23558.2</MicrosoftDotNetTestProjectTemplates60PackageVersion>
<MicrosoftDotNetTestProjectTemplates70PackageVersion>1.1.0-rc.23558.2</MicrosoftDotNetTestProjectTemplates70PackageVersion>
<MicrosoftDotNetTestProjectTemplates80PackageVersion>1.1.0-rc.23558.2</MicrosoftDotNetTestProjectTemplates80PackageVersion>
<MicrosoftDotNetTestProjectTemplates90PackageVersion>1.1.0-rc.23558.2</MicrosoftDotNetTestProjectTemplates90PackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- NUnit3.DotNetNew.Template versions do not 'flow in' -->

View file

@ -27,8 +27,7 @@
<Bundled90Templates Include="Microsoft.Dotnet.WinForms.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWinFormsProjectTemplates90PackageVersion)" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<Bundled90Templates Include="Microsoft.Dotnet.Wpf.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWpfProjectTemplates90PackageVersion)" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<Bundled90Templates Include="Microsoft.DotNet.Common.ProjectTemplates.9.0" PackageVersion="$(MicrosoftDotNetCommonItemTemplates90PackageVersion)" />
<!-- Not available yet for 9.0 -->
<Bundled90Templates Include="Microsoft.DotNet.Test.ProjectTemplates.8.0" PackageVersion="$(MicrosoftDotNetTestProjectTemplates80PackageVersion)" />
<Bundled90Templates Include="Microsoft.DotNet.Test.ProjectTemplates.9.0" PackageVersion="$(MicrosoftDotNetTestProjectTemplates90PackageVersion)" />
</ItemGroup>
<ItemGroup Label=".NET 8.0 templates">

View file

@ -437,14 +437,6 @@ namespace EndToEnd.Tests
int latestMajorVersion = runtimeFolders.Select(folder => int.Parse(Path.GetFileName(folder).Split('.').First())).Max();
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("nunit")
|| template.StartsWith("xunit"))
{
return $"net8.0";
}
return $"net{latestMajorVersion}.0";
}