Add back the console and test templates but use the 7.0 ones for now. That way we don't have to disable all the tests and early dogfooders will still have a template to use.
Fix the tests to all expect a net7.0 version.
This commit is contained in:
parent
dd27f6ae64
commit
5497b1d2e8
3 changed files with 28 additions and 9 deletions
|
@ -31,8 +31,8 @@
|
||||||
|
|
||||||
<!-- NUnit templates are shipped in Test.ProjectTemplates -->
|
<!-- NUnit templates are shipped in Test.ProjectTemplates -->
|
||||||
<!-- Not available yet for 8.0 -->
|
<!-- Not available yet for 8.0 -->
|
||||||
<!-- <Bundled80Templates Include="Microsoft.DotNet.Test.ProjectTemplates.8.0" PackageVersion="$(MicrosoftDotNetTestProjectTemplates80PackageVersion)" /> -->
|
<Bundled80Templates Include="Microsoft.DotNet.Test.ProjectTemplates.7.0" PackageVersion="$(MicrosoftDotNetTestProjectTemplates70PackageVersion)" />
|
||||||
<!-- <Bundled80Templates Include="Microsoft.DotNet.Common.ProjectTemplates.8.0" PackageVersion="$(MicrosoftDotNetCommonItemTemplates80PackageVersion)" /> -->
|
<Bundled80Templates Include="Microsoft.DotNet.Common.ProjectTemplates.7.0" PackageVersion="$(MicrosoftDotNetCommonItemTemplates70PackageVersion)" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace Microsoft.DotNet.Tests.EndToEnd
|
||||||
{
|
{
|
||||||
var testProjectCreator = new TestProjectCreator()
|
var testProjectCreator = new TestProjectCreator()
|
||||||
{
|
{
|
||||||
MinorVersion = "7.0"
|
MinorVersion = "8.0"
|
||||||
};
|
};
|
||||||
|
|
||||||
testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages";
|
testProjectCreator.AdditionalProperties["RestorePackagesPath"] = @"$(MSBuildProjectDirectory)\packages";
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace EndToEnd.Tests
|
||||||
{
|
{
|
||||||
public class ProjectBuildTests : TestBase
|
public class ProjectBuildTests : TestBase
|
||||||
{
|
{
|
||||||
private static readonly string currentTfm = "net7.0";
|
private static readonly string currentTfm = "net8.0";
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
public void ItCanNewRestoreBuildRunCleanMSBuildProject()
|
public void ItCanNewRestoreBuildRunCleanMSBuildProject()
|
||||||
|
@ -249,15 +249,15 @@ namespace EndToEnd.Tests
|
||||||
}
|
}
|
||||||
|
|
||||||
[WindowsOnlyTheory]
|
[WindowsOnlyTheory]
|
||||||
[InlineData("wpf", Skip = "https://github.com/dotnet/wpf/issues/2363")]
|
[InlineData("wpf")]
|
||||||
[InlineData("winforms", Skip = "https://github.com/dotnet/wpf/issues/2363")]
|
[InlineData("winforms")]
|
||||||
public void ItCanBuildDesktopTemplates(string templateName)
|
public void ItCanBuildDesktopTemplates(string templateName)
|
||||||
{
|
{
|
||||||
TestTemplateCreateAndBuild(templateName);
|
TestTemplateCreateAndBuild(templateName);
|
||||||
}
|
}
|
||||||
|
|
||||||
[WindowsOnlyTheory]
|
[WindowsOnlyTheory]
|
||||||
[InlineData("wpf", Skip = "https://github.com/dotnet/wpf/issues/2363")]
|
[InlineData("wpf")]
|
||||||
public void ItCanBuildDesktopTemplatesSelfContained(string templateName)
|
public void ItCanBuildDesktopTemplatesSelfContained(string templateName)
|
||||||
{
|
{
|
||||||
TestTemplateCreateAndBuild(templateName);
|
TestTemplateCreateAndBuild(templateName);
|
||||||
|
@ -328,7 +328,7 @@ namespace EndToEnd.Tests
|
||||||
[InlineData("react")]
|
[InlineData("react")]
|
||||||
public void ItCanCreateTemplateWithDefaultFramework(string templateName)
|
public void ItCanCreateTemplateWithDefaultFramework(string templateName)
|
||||||
{
|
{
|
||||||
string framework = DetectExpectedDefaultFramework();
|
string framework = DetectExpectedDefaultFramework(templateName);
|
||||||
TestTemplateCreateAndBuild(templateName, build: false, framework: framework);
|
TestTemplateCreateAndBuild(templateName, build: false, framework: framework);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ namespace EndToEnd.Tests
|
||||||
[InlineData("grpc")]
|
[InlineData("grpc")]
|
||||||
public void ItCanCreateAndBuildTemplatesWithDefaultFramework_DisableBuildOnLinuxMusl(string templateName)
|
public void ItCanCreateAndBuildTemplatesWithDefaultFramework_DisableBuildOnLinuxMusl(string templateName)
|
||||||
{
|
{
|
||||||
string framework = DetectExpectedDefaultFramework();
|
string framework = DetectExpectedDefaultFramework(templateName);
|
||||||
|
|
||||||
if (RuntimeInformation.RuntimeIdentifier.StartsWith("alpine")) //linux musl
|
if (RuntimeInformation.RuntimeIdentifier.StartsWith("alpine")) //linux musl
|
||||||
{
|
{
|
||||||
|
@ -394,6 +394,25 @@ namespace EndToEnd.Tests
|
||||||
int latestMajorVersion = runtimeFolders.Select(folder => int.Parse(Path.GetFileName(folder).Split('.').First())).Max();
|
int latestMajorVersion = runtimeFolders.Select(folder => int.Parse(Path.GetFileName(folder).Split('.').First())).Max();
|
||||||
if (latestMajorVersion == 8)
|
if (latestMajorVersion == 8)
|
||||||
{
|
{
|
||||||
|
if (template.StartsWith("blazor")
|
||||||
|
|| template.StartsWith("mstest")
|
||||||
|
|| template.StartsWith("classlib")
|
||||||
|
|| template.StartsWith("console")
|
||||||
|
|| template.StartsWith("nunit")
|
||||||
|
|| template.StartsWith("xunit")
|
||||||
|
|| template.StartsWith("xunit")
|
||||||
|
|| template.StartsWith("wpf")
|
||||||
|
|| template.StartsWith("winforms")
|
||||||
|
|| template.StartsWith("mvc")
|
||||||
|
|| template.StartsWith("web")
|
||||||
|
|| template.StartsWith("worker")
|
||||||
|
|| template.StartsWith("razor")
|
||||||
|
|| template.StartsWith("grpc")
|
||||||
|
|| template.StartsWith("angular")
|
||||||
|
|| template.StartsWith("react"))
|
||||||
|
{
|
||||||
|
return "net7.0";
|
||||||
|
}
|
||||||
return $"net{latestMajorVersion}.0";
|
return $"net{latestMajorVersion}.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue