Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

803 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CefGlue - CEF 150.0.11 Fork

This repository contains a fork of CefGlue updated to CEF version 150.0.11 (Chromium 150.0.7871.115), along with the necessary CEF redistribution packages for Linux and macOS.

Overview

CefGlue is a .NET binding for The Chromium Embedded Framework (CEF). It allows you to embed Chromium in .NET applications and provides both Avalonia and WPF web browser control implementations.

NuGet Packages

Package Version Description
CefGlue.Next.Avalonia NuGet Avalonia browser control
CefGlue.Next.WPF NuGet WPF browser control
CefGlue.Next.Core NuGet Core .NET binding for CEF
CefGlue.Next.Common NuGet Shared browser adapter
CefGlue.Next.Common.Shared NuGet Shared utilities and serialization
CefGlue.Next.BrowserProcess.Core NuGet Browser sub-process core

Most applications only need CefGlue.Next.Avalonia or CefGlue.Next.WPF; the remaining packages are pulled in transitively as dependencies.

Why This Fork?

At the time of this fork, the official NuGet packages for the following CEF redistributables were not yet available for version 150.0.11, so this fork builds and publishes them:

Package Version Platform
cef.runtime.linux-x64 NuGet Linux x64
cef.runtime.linux-arm64 NuGet Linux ARM64
cef.runtime.osx-x64 NuGet macOS x64
cef.runtime.osx-arm64 NuGet macOS ARM64

The source projects for these packages are also included directly in this workspace, so you can build them locally if needed. (Windows uses the official chromiumembeddedframework.runtime.* packages from nuget.org.)

Repository Structure

├── cef-version.json            # Central CEF version configuration (single source of truth)
├── CefVersion.props            # MSBuild import for CEF version properties
├── CefGlue/                    # Main CefGlue .NET bindings and demo projects
│   ├── CefGlue/                # Core CefGlue library (.NET wrapper for CEF)
│   ├── CefGlue.Avalonia/       # Avalonia browser control implementation
│   ├── CefGlue.WPF/            # WPF browser control implementation
│   ├── CefGlue.Common/         # Shared browser adapter code
│   ├── CefGlue.Common.Shared/  # Shared utilities and serialization
│   ├── CefGlue.BrowserProcess/ # Browser subprocess executable
│   ├── CefGlue.Demo.Avalonia/  # Avalonia demo application
│   ├── CefGlue.Demo.WPF/       # WPF demo application
│   ├── CefGlue.Tests/          # Unit tests
│   └── Nuget/                  # NuGet packaging configuration
│
├── runtime-packages/           # CEF redistribution NuGet packages (all RIDs, single project)
│   ├── runtime-packages.csproj # SDK-style project; build with `dotnet pack --runtime <rid>`
│   ├── make_cefredist_linux.sh # Downloads & stages CEF binaries for Linux
│   ├── make_cefredist_osx.sh   # Downloads & stages CEF binaries for macOS
│   ├── make_cefredist.ps1      # Windows wrapper that calls the appropriate sh script via WSL
│   ├── cef.runtime.<rid>.props # MSBuild props injected into consuming projects
│   ├── deploy-cef-framework.sh # macOS post-install helper
│   └── redist/                 # Staged CEF binaries (generated, git-ignored)
│
└── LocalPackages/              # Output folder for locally built NuGet packages

Version Information

Component Version
CEF 150.0.11
Chromium 150.0.7871.115
CefGlue 150.7871.115
Target Framework .NET 10.0
Avalonia 11.3.14

Supported Platforms

OS x64 ARM64 WPF Avalonia Avalonia XPF
Windows ✔️ ✔️ ✔️ ✔️ ✔️
macOS ✔️ ✔️ ✔️ ✔️
Linux ✔️ 🔘 ✔️ ✔️

✔️ Supported
❌ Not supported
🔘 Works with issues (see Linux ARM64 notes below)

Getting Started

Prerequisites

  • .NET 10.0 SDK
  • Visual Studio 2022 or VS Code with C# extension
  • For Linux/macOS CEF package building:
    • curl or aria2c
    • tar with bzip2 support
    • strip (binutils)

Building the Solution

  1. Open CefGlue/Xilium.CefGlue.slnx in Visual Studio or your preferred IDE
  2. Build the solution

Running the Demo Applications

WPF Demo (Windows only):

cd CefGlue/CefGlue.Demo.WPF
dotnet run -c Release

Avalonia Demo (Cross-platform):

cd CefGlue/CefGlue.Demo.Avalonia
dotnet run -c Release

Building CEF Redistribution Packages

All four runtime packages are built from the single runtime-packages/runtime-packages.csproj project using dotnet pack. The PrepareRedist MSBuild target automatically invokes the appropriate download/staging script before the nuspec is assembled, so no manual script invocation is needed.

This will:

  1. Download CEF binaries from Spotify's CDN (~375 MB per architecture)
  2. Extracts the redistributable parts
  3. Create NuGet packages in the LocalPackages/ folder
cd runtime-packages

macOS

# ARM64
dotnet pack runtime-packages.csproj --runtime osx-arm64

# x64
dotnet pack runtime-packages.csproj --runtime osx-x64

Linux

# x64
dotnet pack runtime-packages.csproj --runtime linux-x64

# ARM64
dotnet pack runtime-packages.csproj --runtime linux-arm64

On Windows the PrepareRedist target calls make_cefredist.ps1, which delegates to the appropriate shell script via WSL. On Linux/macOS it calls the shell script directly.

Packed .nupkg files are written to LocalPackages/, which is already configured as a local NuGet feed for the solution.

Linux ARM64 Notes

There are known issues with dynamic loading of CEF on ARM64 Linux due to TLS (Thread Local Storage) limitations. Workarounds include:

  1. Using LD_PRELOAD:

    LD_PRELOAD=/path/to/libHarfBuzzSharp.so:/path/to/libcef.so ./YourApplication
  2. Patching ELF files:

    patchelf --add-needed libHarfBuzzSharp.so --add-needed libcef.so path/to/YourApplication
    patchelf --add-needed libcef.so path/to/Xilium.CefGlue.BrowserProcess

See CefGlue/LINUX.md for more details.

Related Repositories

License

  • CefGlue is licensed under the MIT License
  • CEF is licensed under the BSD License

Acknowledgments

  • Original CefGlue by XiliumHQ
  • Maintained by OutSystems
  • The Chromium Embedded Framework Authors

About

.NET binding for The Chromium Embedded Framework (CEF)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages