diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index a2d8d3b99..f90a22160 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -396,12 +396,16 @@ 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("winforms")) + if (template.StartsWith("mstest") + || template.StartsWith("mstest") + || template.StartsWith("classlib") + || template.StartsWith("console") + || template.StartsWith("nunit") + || template.StartsWith("xunit")) { - return $"net{latestMajorVersion}.0"; + return "net6.0"; } - - return "net6.0"; + return $"net{latestMajorVersion}.0"; } throw new Exception("Unsupported version of SDK");