[main] Update dependencies from dotnet/sdk (#12826)

[main] Update dependencies from dotnet/sdk
- Coherency Updates:
  - Microsoft.WindowsDesktop.App.Ref: from 7.0.0-alpha.1.21611.2 to 7.0.0-alpha.1.21616.1 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.WindowsDesktop.SharedFramework.x64.7.0: from 7.0.0-alpha.1.21611.2 to 7.0.0-alpha.1.21616.1 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.WindowsDesktop.TargetingPack.x64.7.0: from 7.0.0-alpha.1.21611.2 to 7.0.0-alpha.1.21616.1 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Ref: from 7.0.0-alpha.1.21612.5 to 7.0.0-alpha.1.21616.17 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.NetCore.TargetingPack.x64.7.0: from 7.0.0-alpha.1.21612.5 to 7.0.0-alpha.1.21616.17 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Runtime.win-x64: from 7.0.0-alpha.1.21612.5 to 7.0.0-alpha.1.21616.17 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.App.Host.win-x64: from 7.0.0-alpha.1.21612.5 to 7.0.0-alpha.1.21616.17 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.DotNetHostResolver: from 7.0.0-alpha.1.21612.5 to 7.0.0-alpha.1.21616.17 (parent: Microsoft.NET.Sdk)
  - Microsoft.NETCore.Platforms: from 7.0.0-alpha.1.21612.5 to 7.0.0-alpha.1.21616.17 (parent: Microsoft.NET.Sdk)
  - Microsoft.AspNetCore.App.Ref: from 7.0.0-alpha.1.21613.11 to 7.0.0-alpha.1.21616.8 (parent: Microsoft.NET.Sdk)
  - Microsoft.AspNetCore.App.Ref.Internal: from 7.0.0-alpha.1.21613.11 to 7.0.0-alpha.1.21616.8 (parent: Microsoft.NET.Sdk)
  - Microsoft.AspNetCore.App.Runtime.win-x64: from 7.0.0-alpha.1.21613.11 to 7.0.0-alpha.1.21616.8 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.AspNetCore.SharedFramework.x64.7.0: from 7.0.0-alpha.1.21613.11 to 7.0.0-alpha.1.21616.8 (parent: Microsoft.NET.Sdk)
  - dotnet-dev-certs: from 7.0.0-alpha.1.21613.11 to 7.0.0-alpha.1.21616.8 (parent: Microsoft.NET.Sdk)
  - dotnet-user-secrets: from 7.0.0-alpha.1.21613.11 to 7.0.0-alpha.1.21616.8 (parent: Microsoft.NET.Sdk)
  - Microsoft.DotNet.Common.ItemTemplates: from 7.0.100-alpha.1.21613.3 to 7.0.100-alpha.1.21617.2 (parent: Microsoft.NET.Sdk)
  - Microsoft.TemplateEngine.Cli: from 7.0.100-alpha.1.21613.3 to 7.0.100-alpha.1.21617.2 (parent: Microsoft.NET.Sdk)
  - Microsoft.WindowsDesktop.App.Runtime.win-x64: from 7.0.0-alpha.1.21611.2 to 7.0.0-alpha.1.21616.1 (parent: Microsoft.NET.Sdk)
  - Microsoft.Dotnet.WinForms.ProjectTemplates: from 7.0.0-alpha.1.21609.2 to 7.0.0-alpha.1.21615.7 (parent: Microsoft.WindowsDesktop.App.Runtime.win-x64)
  - Microsoft.WindowsDesktop.App.Runtime.win-x64: from 7.0.0-alpha.1.21611.2 to 7.0.0-alpha.1.21616.1 (parent: Microsoft.NET.Sdk)
  - Microsoft.DotNet.Wpf.ProjectTemplates: from 7.0.0-alpha.1.21611.1 to 7.0.0-alpha.1.21615.8 (parent: Microsoft.WindowsDesktop.App.Runtime.win-x64)
  - Microsoft.NET.Test.Sdk: from 17.2.0-preview-20211214-01 to 17.2.0-preview-20211214-03 (parent: Microsoft.NET.Sdk)
  - Microsoft.NET.ILLink.Tasks: from 7.0.100-1.21613.2 to 7.0.100-1.21616.1 (parent: Microsoft.NET.Sdk)
  - VS.Redist.Common.NetCore.SharedFramework.x64.7.0: from 7.0.0-alpha.1.21612.5 to 7.0.0-alpha.1.21616.17 (parent: Microsoft.NET.Sdk)

 - Update default tf from winforms templates.
This commit is contained in:
dotnet-maestro[bot] 2021-12-17 21:28:08 +00:00 committed by GitHub
parent 6f39bd4bb4
commit ef80dcb010
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 83 additions and 76 deletions

View file

@ -361,7 +361,7 @@ namespace EndToEnd.Tests
[InlineData("winformscontrollib", "VB")]
public void ItCanCreateAndBuildTemplatesWithDefaultFramework_Windows(string templateName, string language = "")
{
string framework = DetectExpectedDefaultFramework();
string framework = DetectExpectedDefaultFramework(templateName);
TestTemplateCreateAndBuild(templateName, selfContained: true, language: language, framework: $"{framework}-windows");
}
@ -386,7 +386,7 @@ namespace EndToEnd.Tests
}
}
private static string DetectExpectedDefaultFramework()
private static string DetectExpectedDefaultFramework(string template = "")
{
string dotnetFolder = Path.GetDirectoryName(RepoDirectoriesProvider.DotnetUnderTest);
string[] runtimeFolders = Directory.GetDirectories(Path.Combine(dotnetFolder, "shared", "Microsoft.NETCore.App"));
@ -394,9 +394,16 @@ namespace EndToEnd.Tests
int latestMajorVersion = runtimeFolders.Select(folder => int.Parse(Path.GetFileName(folder).Split('.').First())).Max();
if (latestMajorVersion == 7)
{
// TODO: Update
// 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"))
{
return $"net{latestMajorVersion}.0";
}
return "net6.0";
}
throw new Exception("Unsupported version of SDK");
}