Skip to content

Copy arm64 files for AnyCpu builds - #5288

Open
M4ttsson wants to merge 1 commit into
cefsharp:netarm64from
M4ttsson:netarm64-anycpu
Open

Copy arm64 files for AnyCpu builds#5288
M4ttsson wants to merge 1 commit into
cefsharp:netarm64from
M4ttsson:netarm64-anycpu

Conversation

@M4ttsson

@M4ttsson M4ttsson commented Aug 31, 2026

Copy link
Copy Markdown

Addition to PR: #5267
Fixes: #4155

Summary:

  • Adds arm64 AnyCPU build targets to the NuGet/CefSharp.Common.targets‎ using same layout as for x86 & x64 builds.

Changes:

  • Adds CefSharpTargetDirAnyCpuArm64, resolving to arm64\.
  • In the CefSharpBuildAction=None AnyCPU path, adds ARM64 copies for:
    • @(CefRedistArm64) — CEF redistribution/native resources
    • @(CefSharpCommonBinariesArm64)CefSharp.Core.Runtime.dll, browser subprocess files, etc.
    • @(CefSharpCommonManagedDll)CefSharp.dll, required by the architecture-specific browser subprocess folder
  • Adds the same three ARM64 copy rules to the CefSharpBuildAction=Content AnyCPU path.

How Has This Been Tested?

  1. Built the CefSharp NuGet packages locally from the netarm64 branch including my changes
  2. Configured a .NET Framework 4.8.1 WPF test application to restore CefSharp.Wpf 150.0.110 from that local package feed.
  3. Built the test application as AnyCPU, project file included the following.
    <CefSharpAnyCpuSupport>true</CefSharpAnyCpuSupport> <CefSharpPlatformTargetOverride>AnyCPU</CefSharpPlatformTargetOverride> <PreferNativeArm64>true</PreferNativeArm64
  4. Verified the AnyCPU build output contains all three runtime folders
  5. Deployed the AnyCPU output to a native Windows ARM64 VM. The application startup log reported:
    Process architecture: Arm64 Expected runtime: ...\arm64\CefSharp.Core.Runtime.dll Expected CEF runtime: ...\arm64\libcef.dll

I also validated these changes the same way in our product’s cefsharp-browser application: it builds as AnyCPU with the ARM64 CefSharp runtime included and prefers native ARM64 execution on supported Windows devices.

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)

Summary by CodeRabbit

  • New Features
    • Added ARM64 support to AnyCPU build outputs.
    • ARM64 native files and managed assemblies are now copied into the appropriate architecture-specific folder during packaging.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 8221e8da-994a-4948-b6f5-cd7bad5b8dfa

📥 Commits

Reviewing files that changed from the base of the PR and between 43b9ff5 and 081c4f7.

📒 Files selected for processing (1)
  • NuGet/CefSharp.Common.targets

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The MSBuild targets now define an AnyCPU ARM64 output directory. The None and Content build-action branches copy ARM64 redistribution files, binaries, and managed assemblies into that directory.

Changes

AnyCPU ARM64 packaging

Layer / File(s) Summary
Define the ARM64 target path
NuGet/CefSharp.Common.targets
Adds CefSharpTargetDirAnyCpuArm64, which resolves to the arm64\ subfolder.
Copy ARM64 build outputs
NuGet/CefSharp.Common.targets
Copies ARM64 redistribution files, binaries, and managed assemblies for None and Content build actions. Content items retain PreserveNewest and IncludeInVsix settings.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 081c4

The change adds ARM64 runtime files to AnyCPU build outputs; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested reviewers: amaitland

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: copying ARM64 files for AnyCPU builds.
Description check ✅ Passed The description includes the linked issue, summary, detailed changes, testing steps, change type, and checklist. The omitted screenshots section is not required because screenshots are not appropriate…
Linked Issues check ✅ Passed The changes support issue #4155 by enabling .NET Framework 4.8.1 AnyCPU applications on Windows ARM64 to receive the ARM64 CEF redistribution files, CefSharp runtime binaries, and managed assemblies. …
Out of Scope Changes check ✅ Passed The pull request changes only NuGet/CefSharp.Common.targets and adds ARM64 copy rules directly related to the linked ARM64 support objective. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Description check

Explanation

The description includes the linked issue, summary, detailed changes, testing steps, change type, and checklist. The omitted screenshots section is not required because screenshots are not appropriate for this build-target change.

Full details: Linked Issues check

Explanation

The changes support issue #4155 by enabling .NET Framework 4.8.1 AnyCPU applications on Windows ARM64 to receive the ARM64 CEF redistribution files, CefSharp runtime binaries, and managed assemblies. The implementation preserves the existing x86 and x64 layout.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

✨ 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.

@AppVeyorBot

Copy link
Copy Markdown

@amaitland

Copy link
Copy Markdown
Member

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

3 participants