Skip to content

Commit 7fbfea4

Browse files
hoyosjsazchohfimarcpemsryalanms
committed
Mark ARM64 as a valid platform for WPF and WinForms and fix support bug
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>
1 parent 84e0539 commit 7fbfea4

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

src/redist/targets/GenerateBundledVersions.targets

+3-6
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,7 @@
121121
<WindowsDesktop30RuntimePackRids Include="win-x64;win-x86" />
122122
<WindowsDesktop31RuntimePackRids Include="@(WindowsDesktop30RuntimePackRids)" />
123123
<WindowsDesktop50RuntimePackRids Include="@(WindowsDesktop31RuntimePackRids)" />
124-
<WindowsDesktopRuntimePackRids Include="@(WindowsDesktop50RuntimePackRids)" />
125-
<!-- TODO: remove this once WPF is available on ARM64 and replace usage
126-
of this group for WindowsDesktopRuntimePackRids. -->
127-
<WindowsDesktopRuntimePackWinformsRids Include="@(WindowsDesktopRuntimePackRids);win-arm64" />
124+
<WindowsDesktopRuntimePackRids Include="@(WindowsDesktop50RuntimePackRids);win-arm64" />
128125
</ItemGroup>
129126

130127
<!--
@@ -280,7 +277,7 @@ Copyright (c) .NET Foundation. All rights reserved.
280277
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
281278
TargetingPackVersion="$(MicrosoftWindowsDesktopAppRefPackageVersion)"
282279
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
283-
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackWinformsRids, '%3B')"
280+
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackRids, '%3B')"
284281
IsWindowsOnly="true"
285282
Profile="WindowsForms"
286283
/>
@@ -395,7 +392,7 @@ Copyright (c) .NET Foundation. All rights reserved.
395392
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
396393
TargetingPackVersion="$(_WindowsDesktop50TargetingPackVersion)"
397394
RuntimePackNamePatterns="Microsoft.WindowsDesktop.App.Runtime.**RID**"
398-
RuntimePackRuntimeIdentifiers="@(WindowsDesktopRuntimePackWinformsRids, '%3B')"
395+
RuntimePackRuntimeIdentifiers="@(WindowsDesktop50RuntimePackRids, '%3B')"
399396
IsWindowsOnly="true"
400397
Profile="WindowsForms"
401398
/>

test/EndToEnd/ProjectBuildTests.cs

+10-2
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void ItCanPublishArm64Winforms()
129129
}
130130

131131
[WindowsOnlyFact]
132-
public void ItCantPublishArm64Wpf()
132+
public void ItCanPublishArm64Wpf()
133133
{
134134
DirectoryInfo directory = TestAssets.CreateTestDirectory();
135135
string projectDirectory = directory.FullName;
@@ -144,7 +144,15 @@ public void ItCantPublishArm64Wpf()
144144
new PublishCommand()
145145
.WithWorkingDirectory(projectDirectory)
146146
.Execute(publishArgs)
147-
.Should().Fail();
147+
.Should().Pass();
148+
149+
var selfContainedPublishDir = new DirectoryInfo(projectDirectory)
150+
.Sub("bin").Sub("Debug").GetDirectories().FirstOrDefault()
151+
.Sub("win-arm64").Sub("publish");
152+
153+
selfContainedPublishDir.Should().HaveFilesMatching("PresentationCore.dll", SearchOption.TopDirectoryOnly);
154+
selfContainedPublishDir.Should().HaveFilesMatching("PresentationNative_*.dll", SearchOption.TopDirectoryOnly);
155+
selfContainedPublishDir.Should().HaveFilesMatching($"{directory.Name}.dll", SearchOption.TopDirectoryOnly);
148156
}
149157

150158
[Theory]

0 commit comments

Comments
 (0)