【发布时间】:2019-01-09 16:28:21
【问题描述】:
我只是尝试在一个新的winForm 应用程序上安装CefSharp,我使用 Nuget 安装了最新版本并完成了本文的所有步骤:
https://ourcodeworld.com/articles/read/173/how-to-use-cefsharp-chromium-embedded-framework-csharp-in-a-winforms-application
Running on : "Any CPU"
Visual Studio 2013
CefSharp 69.0.0
当我运行应用程序时出现此错误:
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
Additional information: Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found.
这是代码:
var settings = new CefSettings();
Cef.Initialize(settings, performDependencyCheck: false, browserProcessHandler: null);
知道是什么问题吗?
编辑 这是我项目的 app.config 文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="x86"/>
</assemblyBinding>
</runtime>
</configuration>
【问题讨论】:
-
该文件是否存在于您正在运行的进程(和/或构建输出)的启动目录中?我遇到了一些 NuGet 问题,其中 CefSharp 文件在编译后被删除。
-
@WaiHaLee 启动目录在哪里?因为我只是尝试从 VS2013 运行它
-
它将是包含项目可执行文件的文件夹,例如(myproject.)\bin\debug - (myproject) 是 .csproj 文件所在的位置。
-
AnyCPU支持的官方说明是github.com/cefsharp/CefSharp/issues/1714 github.com/cefsharp/CefSharp.MinimalExample/tree/demo/anycpu 上提供了一个工作示例 -
@amaitland 我尝试了帖子中的所有信息并不断收到此错误。示例项目正常工作,但它适用于 63.0 而不是 69.0。,我还注意到只有
CefSharp.Core.dll未加载但CefSharp.WinForms.dll加载完美
标签: c# winforms cefsharp chromium-embedded