我正在尝试使用CefSharp将我的Web应用加载到Winforms中。我已添加了2个dll文件:CefSharp.dll和CefSharp.WinForms作为引用,并通过添加现有项添加了2个dll文件icudt.dll和libcef.dll到我的项目中。
这是表单的代码:
public WebView web_view;
public Form1()
{
InitializeComponent();
web_view = new WebView("http://localhost:8084/wsmill",new CefSharp.BrowserSettings());
web_view.Dock = DockStyle.Fill;
toolStripContainer1.ContentPanel.Controls.Add(web_view);
CefSharp.CEF.Initialize(new Settings());
}
运行应用程序时,我出现了这个错误
发生未处理的类型为 'System.IO.FileLoadException' 的异常, 在 WindowsFormsApplication1.exe 中 附加信息: 无法加载文件或程序集 'CefSharp.dll' 或其某个依赖项。一个动态链接库 (DLL) 初始化例程失败。 (HRESULT 异常:0x8007045A)
希望谁能知道这个问题并帮助我解决,谢谢。