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
- Update the version of CefSharp.Wpf to the desired version
- 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.
- example error
- In the UtopiaWindowsDesktopClient project, double click the first file (af.pak currently) to open up a view that looks like the following screen shot
-
Delete all the files that are currently in the 'locales' folder.
- 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'
- Now select the 'Application Folder' folder on the left.
- 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\
- 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
- they may also be underlined in blue
- 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
- 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'
- You may want to make sure that you now don't have any duplicate files in 'Application Folder' or any files that you missed deleting that referenced the old CefSharp version.
- You should now be able to build the installers per ususal.