简单的CefSharp应用程序在运行时丢失文件 [英] Simple CefSharp application is missing files at runtime

查看:348
本文介绍了简单的CefSharp应用程序在运行时丢失文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是一个非常简单的问题。
我将示例CefSharp MinimalExample.WinForms项目复制到一个新目录,并重命名为WinProxy。
可以建立。当我运行它时,我会得到;

This is probably a very simple question. I copied the example CefSharp MinimalExample.WinForms project to a new directory and renamed to WinProxy. It builds ok. When I run it I get;

mscorlib.dll
中发生了类型为'System.IO.FileNotFoundException'的未处理异常。其他信息:无法加载文件或程序集 CefSharp.Core.dll或其依赖项之一。找不到指定的模块。

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.

与示例目录相比,我缺少此处列出的许多文件 https://github.com/cefsharp/CefSharp/wiki/Output-files-description-table-(Redistribution)

Comparing with the example directory, I am missing a number of files listed here https://github.com/cefsharp/CefSharp/wiki/Output-files-description-table-(Redistribution)

我确实在示例项目中都引用了CefSharp.Core.dll,CefSharp.WinForms.dll和CefSharp.dll。

I do have CefSharp.Core.dll, CefSharp.WinForms.dll and CefSharp.dll which were all referenced in the example project.

如何获得其余部分?我尝试过将它们复制并重建,但是得到了

How do I get the rest? I tried copying them over and rebuilding but I get;

mscorlib.dll
中发生了'System.IO.FileLoadException'类型的未处理异常。无法加载 CefSharp.Core.dll导入的过程。

An unhandled exception of type 'System.IO.FileLoadException' occurred in mscorlib.dll Additional information: A procedure imported by 'CefSharp.Core.dll' could not be loaded.

谢谢。

推荐答案

与@amaitland讨论之后,我最终卸载了所有NuGet软件包并通过Package Manager控制台安装了每个软件包;

After discussions with @amaitland I ended up uninstalling all NuGet packages and installing each package through the Package Manager Console;

Install-Package cef.redist.x86
Install-Package cef.redist.x64
Install-Package CefSharp.Common
Install-Package CefSharp.WinForms

然后它起作用了。

这篇关于简单的CefSharp应用程序在运行时丢失文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆