Merge pull request from dotnet/marcpopMSFT-testtemplates

Enable 7.0 test templates
This commit is contained in:
Marc Paine 2022-01-24 14:37:20 -08:00 committed by GitHub
commit 7abd046866
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions
src/redist/targets
test/EndToEnd

View file

@ -31,7 +31,7 @@
<Bundled70Templates Include="Microsoft.Dotnet.WinForms.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWinFormsProjectTemplates70PackageVersion)" Condition="'$(DotNetBuildFromSource)' != 'true'" /> <Bundled70Templates Include="Microsoft.Dotnet.WinForms.ProjectTemplates" PackageVersion="$(MicrosoftDotnetWinFormsProjectTemplates70PackageVersion)" Condition="'$(DotNetBuildFromSource)' != 'true'" />
<!-- NUnit templates are shipped in Test.ProjectTemplates --> <!-- 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>
<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. // TODO: This block need to be updated when every template updates their default tfm.
// Currently winforms updated their default templates target but not others. // Currently winforms updated their default templates target but not others.
if (template.StartsWith("mstest") if (template.StartsWith("wpf"))
|| template.StartsWith("mstest")
|| template.StartsWith("nunit")
|| template.StartsWith("xunit")
|| template.StartsWith("wpf"))
{ {
return "net6.0"; return "net6.0";
} }
return $"net{latestMajorVersion}.0"; return $"net{latestMajorVersion}.0";
} }