Skip to content
Per Lundberg edited this page Feb 11, 2014 · 20 revisions

Requirements:

  • Visual Studio 2010: Supported
  • Visual Studio 2012: Supported
  • Visual Studio 2008/.NET 3.5: Not supported any more, but can be used with older CefSharp versions if you really must have .NET 3.5 support.
  • Visual Studio 2013: Not supported yet, but will be as soon as #250 has been resolved.
  • Visual Studio 2005: Dream on... :)

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.

Note: Only the Release folder contains the required CEF dependency files. You either have to switch to the "Release" target in Visual Studio (usually located quite close to the main menu of the program), or copy the files manually from $(SolutionDir)\Release to $(SolutionDir)\Debug, to be able to run in Debug mode.

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.