WinForm CefSharp

WinForm CefSharp

我刚刚尝试在新的 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>

在 app.config 文件中,请检查 CelfSharp 的 dependentAssembly 段。 如果它有任何条目,请确保添加的引用的版本在有效范围内。

在我们的例子中,这是在我们未能安装 Visual C++ 运行时时发生的。