Search code examples
c#.netwpfcefsharp

cannot add cefsharp to wpf


I installed cefsharp using nuget

and followed the tutorial on the link below

https://www.codeproject.com/Articles/881315/Display-HTML-in-WPF-and-CefSharp-Tutorial-Part

but i can't make it work.

currently im using .net framework 4.5.2

enter image description here

i also build the program. i can also run the program, but it doesn't show the webbrowser.

i also add the namespace: xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"

the screenshot of the error is below

enter image description here


Solution

  • This error only occurs when you have opened Visual Studio WPF designer (wiki CefSharp). When you run program everything will be ok.

    enter image description here

    enter image description here