This reverts commit a3fc14fd2e
.
This commit is contained in:
parent
3505317780
commit
53d412f76f
3 changed files with 51 additions and 2 deletions
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.DotNet.TestFramework;
|
||||
|
@ -82,6 +83,51 @@ 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 ItCantPublishArm64Wpf()
|
||||
{
|
||||
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().Fail();
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("console")]
|
||||
[InlineData("classlib")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue