Skip to content
Per Lundberg edited this page Aug 1, 2013 · 20 revisions

Requirements: Visual Studio 2010 or 2012. (2008 is no longer supported, but can be used with older versions.)

Building CefSharp

The CefSharp project comes with all the files you need to be able to build, run and use the project including the libcef dll and lib files.

To build simply open CefSharp.sln and run Build All.

To run one of the example applications, right click on either the CefSharp.Wpf.Example or CefSharp.WinForms.Example project and choose "Set as Startup Project". Then press F5.

Building CEF for use with CefSharp

CefSharp tries to follow the CEF trunk, this means that sometimes there won't be a release of CEF available for download so we build our own (a release build is included in the downloads). Should you for some reason wish/need to recompile CEF you'll need to follow these steps. Be warned though that this is no small undertaking...

  • Follow the Chromium Build Instructions to set up the environment required to build Chromium, this include VS hotfixes, depot tools, Windows SDK and DirectX SDK.
  • Refer to CefSharp.h for the revision numbers of CEF and Chromium used by CefSharp
  • Checkout Chromium at the specific revision. See Get The Code for details on acquiring the Chromium source code.
  • Checkout the relevant revision of CEF into the src/ directory of Chromium and run the cef_create_projects.bat script. See http://code.google.com/p/chromiumembedded/ for details.
  • If CefSharp has any patches in its patches folder these should be applied to CEF/Chromium at this point.
  • Configure the libcef_dll_wrapper project to build with the /MD or /MDd build flags as per these instructions
  • Build the libcef_dll_wrapper project and pick up the libcef.lib, libcef_dll_wrapper.lib and libcef.dll files from the build directory.
  • Congratulate yourself.