Skip to content

Commit 0cef482

Browse files
committed
Nuget - Default AnyCPU Prefer32Bit to x86 when CefSharpAnyCpuSupport is not set
Can be overridden using CefSharpPlatformTargetOverride
1 parent 56959e9 commit 0cef482

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

NuGet/CefSharp.Common.targets

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@
9696
<!--
9797
For Sdk Projects the PlatformTarget is unreliable (https://github.com/dotnet/sdk/issues/1560)
9898
It can incorrectly be AnyCPU when it is infact an arch specific build
99+
When AnyCPU and Prefer32Bit we just set the PlatformTarget to x86 (only when CefSharpAnyCpuSupport is empty)
99100
-->
100101
<CefSharpPlatformTarget>$(PlatformTarget)</CefSharpPlatformTarget>
101102
<CefSharpPlatformTarget Condition="'$(PlatformTargetAsMSBuildArchitecture)' == 'x86' OR '$(PlatformTargetAsMSBuildArchitecture)' == 'x64'">$(PlatformTargetAsMSBuildArchitecture)</CefSharpPlatformTarget>
103+
<CefSharpPlatformTarget Condition="'$(CefSharpPlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' == 'true' AND '$(CefSharpAnyCpuSupport)' == ''">x86</CefSharpPlatformTarget>
102104
<CefSharpPlatformTarget Condition="'$(CefSharpPlatformTargetOverride)' != ''">$(CefSharpPlatformTargetOverride)</CefSharpPlatformTarget>
103105

104106
</PropertyGroup>

0 commit comments

Comments
 (0)