我刚刚尝试在新的CefSharp
应用程序上安装winForm
,我使用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>
答案 0 :(得分:1)
在我们的案例中,这是由于我们无法安装Visual C ++运行时而发生的。
答案 1 :(得分:0)
在app.config文件中,请检查CelfSharp的dependentAssembly段。 如果有任何条目,请确保所添加参考的版本在有效范围内。