Skip to content
jornh edited this page Apr 6, 2014 · 20 revisions

Requirements:

  • Visual Studio 2010: Supported
  • Visual Studio 2012: Supported
  • Visual Studio 2013: Supported, since #288 got merged.
  • 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 2005: Dream on... :)

Building CefSharp

Building with the master Branch

Since commit d3a1f1d the native upstream stuff in the CEF/ folder is now all gone from the master branch.

It now relies on that you do a NuGet Restore to pull in the cef.sdk and cef.redist native CEF packages into your packages/ folder before you can build CefSharp.

After a successful NuGet Restore to build simply open CefSharp3.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 with the CefSharp1 Branch

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.