不能添加到cefsharp WPF

问题描述:

我使用的NuGet不能添加到cefsharp WPF

安装cefsharp并遵循以下

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

链路上的教程,但我不能使它发挥作用。

目前即时通讯使用.NET Framework 4.5.2

enter image description here

我也建立了程序。我也可以运行程序,但它不显示网页浏览器。

我还添加了命名空间:下面

enter image description here

+0

你试过干净和重建.. – tabby

+0

请参阅https://github.com/cefsharp/CefSharp.MinimalExample/tree/master/CefSharp.MinimalExample.Wpf一个工作示例 – amaitland

只有当您打开Visual Studio的WPF设计(wiki CefSharp)会出现此错误。当你运行程序时,一切都会好的。

enter image description here

enter image description here

+0

谢谢。我太笨了 –

尝试xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"

错误的截图就是用这个。

<wpf:ChromiumWebBrowser x:Name="wb" Address="https://www.google.com" /> 

有像你这样的一个例子,在here

看来你没有添加referecnces到项目中,首先添加引用,然后包括他们进入你的代码。