Skip to content

Commit

Permalink
Merge pull request #18872 from unoplatform/dev/jela/platform-target
Browse files Browse the repository at this point in the history
fix(webview2): Adjust target platform selection for windows builds
  • Loading branch information
jeromelaban authored Nov 21, 2024
2 parents a7af273 + 153b8ca commit 4332529
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Uno.Sdk/targets/Uno.Common.WinAppSdk.targets
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
<Platform Condition="$(Platform) == 'AnyCPU'">$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)</Platform>
<PublishProfile Condition=" $(PublishProfile) == '' ">win-$(Platform).pubxml</PublishProfile>
<UseWinUI Condition=" $(UseWinUI) == '' ">true</UseWinUI>

<!-- Explicitly set the PlatformTarget in order for packages like WebView2 to select the appropriate binaries -->
<PlatformTarget Condition=" '$(PlatformTarget)' == '' AND $(Platform) == 'AnyCPU' AND '$(NETCoreSdkRuntimeIdentifier)' == 'win-x86'">x86</PlatformTarget>
<PlatformTarget Condition=" '$(PlatformTarget)' == '' AND $(Platform) == 'AnyCPU' AND '$(NETCoreSdkRuntimeIdentifier)' == 'win-x64'">x64</PlatformTarget>
<PlatformTarget Condition=" '$(PlatformTarget)' == '' AND $(Platform) == 'AnyCPU' AND '$(NETCoreSdkRuntimeIdentifier)' == 'win-arm64'">arm64</PlatformTarget>
</PropertyGroup>

<!-- Legacy Project Support -->
Expand Down

0 comments on commit 4332529

Please sign in to comment.