我一直在尝试让CefSharp与WPF(.NET Core)一起使用,每次尝试时,它总是给我这个错误:
FileNotFoundException: Could not load file or assembly 'CefSharp.Wpf, Culture=neutral, PublicKeyToken=40c4b6fc221f4138'. The system cannot find the file specified.
错误发生在这里:
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent(); <-
}
}
这是XAML文件
<Window x:Class="testwpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cefSharp="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf"
Title="MainWindow" Height="550" Width="625">
<Grid>
<cefSharp:ChromiumWebBrowser Grid.Row="0"
Address="https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions" />
</Grid>
</Window>