Skip to content

Update to support ARM64 build target#5246

Draft
jamescharters wants to merge 3 commits into
cefsharp:masterfrom
jamescharters:ter-805-arm64-target
Draft

Update to support ARM64 build target#5246
jamescharters wants to merge 3 commits into
cefsharp:masterfrom
jamescharters:ter-805-arm64-target

Conversation

@jamescharters
Copy link
Copy Markdown

@jamescharters jamescharters commented May 19, 2026

Fixes: [issue-number]

Summary: [summary of the change and which issue is fixed here]

This change introduces full ARM64 support for CefSharp, covering native C++/CLI projects, managed .NET Framework projects, NuGet packaging, and the build pipeline. It enables CefSharp to be built and distributed for Windows ARM64 devices natively.

Changes: [specify the structures changed]

  • Added ArchitectureHelper.cs — new helper class that resolves the current process architecture (x86/x64/arm64) for both .NET Framework and .NET Core
  • Modified CefRuntime.cs — replaced Environment.Is64BitProcess checks with ArchitectureHelper.ProcessArchitecture so ARM64 processes resolve the correct arch-specific assembly path
  • Modified DependencyChecker.cs — skips d3dcompiler_47.dll in optional dependency checks when running on ARM64 (not available on that platform)
  • Modified CefSharp.Core.Runtime.vcxproj and CefSharp.BrowserSubprocess.Core.vcxproj — added Debug|arm64 and Release|arm64 project configurations
  • Modified CefSharp.BrowserSubprocess.csproj — added arm64 platform/runtime identifier and updated the post-build editbin/sn script to select the correct vcvarsall arch for x86, x64, and arm64 (including cross-compile from AMD64 host)
  • Modified CefSharp3.sln — registered Debug|arm64 and Release|arm64 solution-level configurations for all projects
  • Modified CefSharp.Native.props — added arm64 locale content item group
  • Modified example and test projects (OffScreen, WinForms, WPF, HwndHost, Test) — added arm64 to , , and conditional / properties
  • Modified CefSharp.Common.nuspec — added chromiumembeddedframework.runtime.win-arm64 dependency and arm64 binary entries
  • Modified CefSharp.Common.props — added CefSharpCommonBinariesArm64 and CefSharpBrowserProcessCoreArm64 item groups
  • Modified CefSharp.Common.targets — added arm64 / item groups and CefSharpCopyFilesAfterNugetRestoreArm64 copy target
  • Modified build.ps1 — refactored BuildSolution to invoke msbuild.exe directly; added Get-HostArchitecture, Get-VCVarsAllArch, and Ensure-BuildEnvironment helpers to correctly bootstrap the VC environment per target arch (native or cross-compile); removed the blanket arm64 exclusion for NetFramework builds and replaced it with a guard that requires VS2022/v143 when targeting arm64

How Has This Been Tested?

Built the solution targeting ARM64 using build.ps1 with -BuildArches arm64 -Target vs2022 on an AMD64 host (cross-compile). Verified arm64 binaries are produced in bin\arm64\Release for both CefSharp.Core.Runtime and CefSharp.BrowserSubprocess.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Updated documentation

Checklist:

  • Tested the code(if applicable)
  • Commented my code
  • Changed the documentation(if applicable)
  • New files have a license disclaimer
  • The formatting is consistent with the project (project supports .editorconfig)

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 19, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 44dcde4e-992c-406d-9941-6f8b833a7e7a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@AppVeyorBot
Copy link
Copy Markdown

@AppVeyorBot
Copy link
Copy Markdown

Build CefSharp 147.0.100-CI5488 failed (commit da5271272b by @)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants