Skip to content

Commit

Permalink
fix(webview2): Adjust target platform selection for windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Nov 20, 2024
1 parent 2f48f5f commit 5a5cdca
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 '$(NETCoreSdkRuntimeIdentifier)' == 'win-x86'">x86</EffectivePlatform>
<PlatformTarget Condition=" '$(PlatformTarget)' == '' AND '$(NETCoreSdkRuntimeIdentifier)' == 'win-x64'">x64</EffectivePlatform>
<PlatformTarget Condition=" '$(PlatformTarget)' == '' AND '$(NETCoreSdkRuntimeIdentifier)' == 'win-arm64'">arm64</EffectivePlatform>
</PropertyGroup>

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

0 comments on commit 5a5cdca

Please sign in to comment.