Skip to main content

How To Update CefSharp Version

This update process may not work for future updates to CefSharp. The next version of CefSharp starts using some different libraries (chromiumembeddedframework instead of cef.redist.x86). Knowing these steps will likely still be important though because we will still likely need to update the setup / installer project

  1.  Update the version of CefSharp.Wpf to the desired version
    • This will also update CefSharp.Common and cef.redist.x86 and cef.redist.x64image.png
  2. Attempt to rebuild the UtopiaWindowsDesktopClient (Release | x86), you should get build errors in the output console indicating that it couldn't find files specific to the previous version of CefSharp.
    • example error
      • ERROR: Unable to find source file 'C:\src\UtopiaClientApplications\UtopiaWindowsDesktopClient\packages\cef.redist.x86.109.1.11\CEF\locales\ru.pak' for file 'ru.pak', located in '[TARGETDIR]\locales', the file may be absent or locked. 
    • You may also get build errors you need to resolve because CefSharp updates are not always backwards compatible.
  3. In the UtopiaWindowsDesktopClient project, double click the first file (af.pak currently) to open up a view that looks like the following screen shot
    • image.png

  4. Delete all the files that are currently in the 'locales' folder.

    • image.png

  5. Right click the 'locales' folder on the left, and in the dropdown select 'Add' -> 'File', and add all the files from 'C:\src\UtopiaClientApplications\UtopiaWindowsDesktopClient\packages\cef.redist.x86.{UPDATED_TO_VERSION}\CEF\locales'
  6. Now select the 'Application Folder' folder on the left.
  7. Delete any files that start with the following paths (be vary careful when you do this so you don't accidentally delete a file you weren't supposed to)
    • C:\src\UtopiaClientApplications\UtopiaWindowsDesktopClient\packages\CefSharp.Common.109.1.110\CefSharp\x86\
    • 'C:\src\UtopiaClientApplications\UtopiaWindowsDesktopClient\packages\cef.redist.x86.109.1.11\CEF\
    • image.png

    • you can reference the errors in the output console when building to see exactly what files it can't find and need to be deleted
  8. Right click 'Application Folder' on the left, and in the dropdown select 'Add' => 'File', and all the files from 'C:\src\UtopiaClientApplications\UtopiaWindowsDesktopClient\packages\cef.redist.x86.{UPDATED_TO_VERSION}\CEF' except for the following
    • locales folder
    • README.txt
    • LICENSE.txt
    • maybe keeps eyes out for other .txt files that might be added the future (you basically want the .dlls. .pak, .dat, .bin, and .json files)
    • image.png

  9. Right click 'Application Folder' on the left, and in the dropdown select 'Add' => 'File', and all the files from 'C:\src\UtopiaClientApplications\UtopiaWindowsDesktopClient\packages\CefSharp.Common.{UPDATED_TO_VERSION}\CefSharp\x86' 
    • image.png

  10. You should now be able to build the installers per ususal.