Mark ARM64 as a valid platform for WPF and WinForms and fix support bug (#9523)

Co-authored-by: Alexandre Zollinger Chohfi <alzollin@microsoft.com>
Co-authored-by: Marcpems <marcpe@microsoft.com>
Co-authored-by: Ryland <41491307+ryalanms@users.noreply.github.com>
This commit is contained in:
Juan Hoyos 2021-01-22 18:08:53 -08:00 committed by GitHub
commit 71ad0d033f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 8 deletions

View file

@ -121,10 +121,7 @@
<WindowsDesktop30RuntimePackRids Include="win-x64;win-x86" />
<WindowsDesktop31RuntimePackRids Include="@(WindowsDesktop30RuntimePackRids)" />
<WindowsDesktop50RuntimePackRids Include="@(WindowsDesktop31RuntimePackRids)" />
<WindowsDesktopRuntimePackRids Include="@(WindowsDesktop50RuntimePackRids)" />
<!-- TODO: remove this once WPF is available on ARM64 and replace usage
of this group for WindowsDesktopRuntimePackRids. -->
<WindowsDesktopRuntimePackWinformsRids Include="@(WindowsDesktopRuntimePackRids);win-arm64" />
<WindowsDesktopRuntimePackRids Include="@(WindowsDesktop50RuntimePackRids);win-arm64" />
</ItemGroup>
<!--
@ -280,7 +277,7 @@ Copyright (c) .NET Foundation. All rights reserved.
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
TargetingPackVersion="$(MicrosoftWindowsDesktopAppRefPackageVersion)"
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackWinformsRids, '%3B')"
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackRids, '%3B')"
IsWindowsOnly="true"
Profile="WindowsForms"
/>
@ -395,7 +392,7 @@ Copyright (c) .NET Foundation. All rights reserved.
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
TargetingPackVersion="$(_WindowsDesktop50TargetingPackVersion)"
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackWinformsRids, '%3B')"
RuntimePackRuntimeIdentifiers="@(WindowsDesktop50RuntimePackRids, '%3B')"
IsWindowsOnly="true"
Profile="WindowsForms"
/>

View file

@ -129,7 +129,7 @@ namespace EndToEnd.Tests
}
[WindowsOnlyFact]
public void ItCantPublishArm64Wpf()
public void ItCanPublishArm64Wpf()
{
DirectoryInfo directory = TestAssets.CreateTestDirectory();
string projectDirectory = directory.FullName;
@ -144,7 +144,15 @@ namespace EndToEnd.Tests
new PublishCommand()
.WithWorkingDirectory(projectDirectory)
.Execute(publishArgs)
.Should().Fail();
.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]