0

Hi I am new to cefsharp and tried using Cefsharp chromium web browser . when ever i tried to call the webbrowser it throws an exception like below

Could not load file or assembly 'CefSharp.Wpf, PublicKeyToken=40c4b6fc221f4138' or one of its dependencies. The system cannot find the file specified.'

enter image description here

But i have added the reference cefsharp.wpf in project What do i miss here ?

And if i tried from codebehinf too the same issue occurs.

I just had the below piece of code next to InnitializeComponent.

ChromiumWebBrowser browser = new ChromiumWebBrowser();
Dah Sra
  • 4,107
  • 3
  • 30
  • 69

2 Answers2

0

Manually i counldn't resolve the issue in my working solution.

As a work around what i did is as @amaitland suggested i cloned a copy of CefSharp Minimal Example from here and used the Minimal Example for WPF solution.

I just copied all the logic from my solution tand pasted it in the minimal expansion and updated it .

Now ChromiumWebBrowser works fine for me ( Only after using that Minimal example provided by cefsharp )..

Dah Sra
  • 4,107
  • 3
  • 30
  • 69
0

In Application > Properties > Build Change Check "Prefer 32-bits"

Luiz Baião
  • 131
  • 1
  • 4