Switching to 7.0 test templates

This commit is contained in:
Marc Paine 2022-01-24 10:30:13 -08:00
parent 1e35b16223
commit babb2cda6e
2 changed files with 3 additions and 7 deletions

View file

@ -31,7 +31,7 @@
<Bundled70Templates Include="Microsoft.Dotnet.WinForms.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWinFormsProjectTemplates70PackageVersion)" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<!-- NUnit templates are shipped in Test.ProjectTemplates -->
<Bundled70Templates Include="Microsoft.DotNet.Test.ProjectTemplates.6.0" PackageVersion="$(MicrosoftDotNetTestProjectTemplates60PackageVersion)" />
<Bundled70Templates Include="Microsoft.DotNet.Test.ProjectTemplates.7.0" PackageVersion="$(MicrosoftDotNetTestProjectTemplates70PackageVersion)" />
</ItemGroup>
<ItemGroup>

View file

@ -396,13 +396,9 @@ namespace EndToEnd.Tests
{
// 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("mstest")
|| template.StartsWith("nunit")
|| template.StartsWith("xunit")
|| template.StartsWith("wpf"))
if (template.StartsWith("wpf"))
{
return "net6.0";
return "net6.0";
}
return $"net{latestMajorVersion}.0";
}