July 1

Getting started with Xilium.CefGlue


Last week I spent 3 pomodoros of deliberate practice trying to get started with the Chrome Embedded Framework (CEF). I am interested in learning something about it because it’s used in the product I am currently working on (SQL Source Control).

CEF allows you to use web technologies in a desktop application and it does that embedding the Chrome engine into your application. From a quick look in Wikipedia, look like there are many .NET bindings. I don’t know which one is best but I selected Xilium.CefGlue because it the one used in my project. I know other projects in Redgate that use others bindings like CefSharp.

Unfortunately there is very little documentation for getting started with Xilium.CefGlue. Very disappointing. I found the following blog post to be very useful: http://joelverhagen.com/blog/2013/12/headless-chromium-in-c-with-cefglue/

There are no binaries for CefGlue. You need to clone the repository and manually build it. I did it using Visual Studio 2015 and it worked.

In order to run the demo project, you need to copy the CEF binaries in the same folder.

When I lunched the demo project I got the following error.

2016-06-17 22_32_41-Greenshot

As mentioned in the blog post, it’s very important to make sure that the CEF version used by CefGlue match the version in the CEF binaries that you copied. If not, you get an error. This was the most annoying thing and as soon as I found a matching version the demo projected worked.

You can see my blog loaded inside a Windows Forms application.

2016-06-17 22_45_31-The .NET Engineer - Andrea Angella - Software is my passion - Xilium CefGlue Dem


You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Subscribe to our newsletter now!

Get instant access to the Master C# 9 webinar to learn all the new exciting C# 9 features quickly.
Get regular videos and news on C# and .NET and offers on products and services to master C#.

We will collect, use and protect your data in accordance with our Privacy Policy.