Skip to content

Commit 64eb204

Browse files
committed
Re-add PlatformCheck to CefSharp.Common.targets - as AnyCPU won't work out of the box we'll still advise to use x86/x64, to use AnyCPU you'll need to
set CefSharpAnyCpuSupport in your project before you'll be allowed to use it, should hopefully reduce all the support complaints for those who don't read the documentation.
1 parent 7bdf73b commit 64eb204

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

NuGet/CefSharp.Common.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Target Name="PlatformCheck" BeforeTargets="ResolveAssemblyReferences" Condition="(('$(Platform)' != 'x86') AND ('$(Platform)' != 'x64') AND ('$(Platform)' != 'Win32') AND '$(CefSharpAnyCpuSupport)' != 'true')">
4+
<Error Text="$(MSBuildThisFileName) will work out of the box if you specify platform (x86 / x64). For AnyCPU Support see https://github.com/cefsharp/CefSharp/issues/1714" />
5+
</Target>
6+
37
<Target Name="CefSharpCopyLibs86" BeforeTargets="AfterBuild" Condition="'$(Platform)' == 'x86'">
48
<ItemGroup>
59
<CefSharpBinaries Include="$(MSBuildThisFileDirectory)..\CefSharp\x86\*.*" />

0 commit comments

Comments
 (0)