diff --git a/src/redist/targets/GenerateBundledVersions.targets b/src/redist/targets/GenerateBundledVersions.targets index 657c88fc2..07976cad6 100644 --- a/src/redist/targets/GenerateBundledVersions.targets +++ b/src/redist/targets/GenerateBundledVersions.targets @@ -127,7 +127,7 @@ - + - - - - - diff --git a/test/EndToEnd/ProjectBuildTests.cs b/test/EndToEnd/ProjectBuildTests.cs index 11c64c7f7..938b846e6 100644 --- a/test/EndToEnd/ProjectBuildTests.cs +++ b/test/EndToEnd/ProjectBuildTests.cs @@ -3,6 +3,7 @@ using System.IO; using System.Runtime.InteropServices; +using System.Linq; using System.Xml.Linq; using Microsoft.DotNet.TestFramework; using Microsoft.DotNet.Tools.Test.Utilities; @@ -82,6 +83,58 @@ namespace EndToEnd.Tests .Should().Pass().And.HaveStdOutContaining("Hello World!"); } + [WindowsOnlyFact] + public void ItCanPublishArm64Winforms() + { + DirectoryInfo directory = TestAssets.CreateTestDirectory(); + string projectDirectory = directory.FullName; + + string newArgs = "winforms --no-restore"; + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + string publishArgs="-r win-arm64"; + new PublishCommand() + .WithWorkingDirectory(projectDirectory) + .Execute(publishArgs) + .Should().Pass(); + var selfContainedPublishDir = new DirectoryInfo(projectDirectory) + .Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault() + .Sub("win-arm64").Sub("publish"); + + selfContainedPublishDir.Should().HaveFilesMatching("System.Windows.Forms.dll", SearchOption.TopDirectoryOnly); + selfContainedPublishDir.Should().HaveFilesMatching($"{directory.Name}.dll", SearchOption.TopDirectoryOnly); + } + + [WindowsOnlyFact] + public void ItCanPublishArm64Wpf() + { + DirectoryInfo directory = TestAssets.CreateTestDirectory(); + string projectDirectory = directory.FullName; + + string newArgs = "wpf --no-restore"; + new NewCommandShim() + .WithWorkingDirectory(projectDirectory) + .Execute(newArgs) + .Should().Pass(); + + string publishArgs="-r win-arm64"; + new PublishCommand() + .WithWorkingDirectory(projectDirectory) + .Execute(publishArgs) + .Should().Pass(); + + var selfContainedPublishDir = new DirectoryInfo(projectDirectory) + .Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault() + .Sub("win-arm64").Sub("publish"); + + selfContainedPublishDir.Should().HaveFilesMatching("PresentationCore.dll", SearchOption.TopDirectoryOnly); + selfContainedPublishDir.Should().HaveFilesMatching("PresentationNative_*.dll", SearchOption.TopDirectoryOnly); + selfContainedPublishDir.Should().HaveFilesMatching($"{directory.Name}.dll", SearchOption.TopDirectoryOnly); + } + [Theory] [InlineData("console")] [InlineData("classlib")]