Skip to content

Commit 3a6334a

Browse files
committed
Nuget - Disable AnyCPU check for BuildTransitive Library Projects
Issue #3622
1 parent 71751c3 commit 3a6334a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

NuGet/CefSharp.Common.targets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,15 @@
126126
<CefSharpPlatformTarget Condition="'$(CefSharpPlatformTarget)' == 'AnyCPU' AND '$(Prefer32Bit)' == 'true' AND '$(CefSharpAnyCpuSupport)' == ''">x86</CefSharpPlatformTarget>
127127
<CefSharpPlatformTarget Condition="'$(CefSharpPlatformTargetOverride)' != ''">$(CefSharpPlatformTargetOverride)</CefSharpPlatformTarget>
128128

129+
<!--
130+
For PackageReference library projects where buildTransitive is supported we'll default to setting CefSharpAnyCpuSupport to true
131+
This should only require WinExe and Exe projects to specify CefSharpAnyCpuSupport rather than every project in a solution.
132+
Only for PackageReference projects where NuGetToolVersion > 5.0 and OutputType is library.
133+
Defaulting CefSharpAnyCpuSupport to true is simpler than modifying the already complex Condition for the CefSharpPlatformCheck
134+
target below.
135+
https://github.com/cefsharp/CefSharp/issues/3622
136+
-->
137+
<CefSharpAnyCpuSupport Condition="'$(CefSharpAnyCpuSupport)' != 'true' AND '$(NuGetProjectStyle)' == 'PackageReference' AND $(NuGetToolVersion) > '5.0' AND '$(OutputType)' == 'Library'">true</CefSharpAnyCpuSupport>
129138
</PropertyGroup>
130139

131140
<Choose>

0 commit comments

Comments
 (0)