2017-02-09 139 views
0

我使用的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

回答

2

只有當您打開Visual Studio的WPF設計(wiki CefSharp)會出現此錯誤。當你運行程序時,一切都會好的。

enter image description here

enter image description here

+0

謝謝。我太笨了 –

-2

嘗試xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"

錯誤的截圖就是用這個。

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

有像你這樣的一個例子,在here

-1

看來你沒有添加referecnces到項目中,首先添加引用,然後包括他們進入你的代碼。