Jul 01 2016

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

I am a Microsoft MVP and Senior .NET Engineer in Redgate Software. My peers describe me as really enthusiastic, motivated with an infinite passion for software development, a relentless desire to keep learning and an amazing ability to involve others in my pursuit of excellence. I am a proficient C# developer and founder of the Cambridge .NET User Group: the official community on .NET in Cambridge.

Facebook Twitter LinkedIn Google+ YouTube  

Permanent link to this article: https://www.productivecsharp.com/2016/07/dp-getting-started-cef/