2

I have a C# Windows Form application that has a browser feature using the CefSharp browser control. The browser works fine when debugging through VS and when I run it directly from the /Release folder. The problem occurs when I run it through the ClickOnce installation. Anytime I go to open the browser I get an error

System.IO.FileNotFoundException: Could not load file or assembly 'CefSharp.WinForms, Version=86.0.241.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138' or one of its dependencies. The system cannot find the file specified.
File name: 'CefSharp.WinForms, Version=86.0.241.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138'

Any idea how I can solve this?

EDIT

Done a bit of digging and it seems that none of the CefSharp resources are within the application folder. How can I change this?

EDIT 2

Managed to add the Cefsharp files through 'Application Files' in the publish tab. Doesn't fix the error but the some of the files are showing in the folder. As you can see below. enter image description here

The error now looks like this.

enter image description here

lhunter664
  • 99
  • 15
  • I guess it's the same issue as [here](https://stackoverflow.com/a/39675335/7034621) - native CEF DLL is not getting bundled. – orhtej2 Mar 11 '21 at 17:16
  • Came across that post before asking here. The solution didn’t work for me unfortunately – lhunter664 Mar 11 '21 at 17:32
  • Starting with version 88 you can use the option detailed at https://github.com/cefsharp/CefSharp/issues/3319#issuecomment-757106286 currently only works for x86/x64 targets, AnyCPU is not working currently. – amaitland Mar 11 '21 at 19:17

0 Answers0