使用CefSharp WinForms时出错 [英] Error when using CefSharp WinForms

查看:230
本文介绍了使用CefSharp WinForms时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用CefSharp来将Asp.Net网站嵌入Windows窗体中。在Visual Studio上运行时,一切正常,但是当我构建应用程序然后将其部署到客户端(用户PC)时,出现错误消息无法加载文件或程序集'CefSharp.Core.dll或以下之一它的依存关系。主要应用程序内置于x86中,因此我们在x86中使用CefSharp。我已经更新了.Net Framework,甚至复制了icutdtl.dat,但没有解决任何问题。目前,它仅在一个客户端中有效,而在其他客户端中则无效。

I'm currently using CefSharp in order to embed an Asp.Net website inside a Windows Form. When running on Visual Studio everything works fine, but when I build the application and then I deploy it to the client (User Pc) I get an error that says "Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies". The main application is built in x86, thus we're using CefSharp in x86. I've updated the .Net Framework, I even copied icutdtl.dat but nothing gets solved. Currently it only works in one client but in the in the others it doesn't.

什么是导致CefSharp失败的问题?

What could be the problem that causes CefSharp to fail?

推荐答案

CefSharp 使用 VC ++ 2012 ,需要在客户端计算机上安装 redist 或将相关文件包含在bin目录中。确保安装了匹配的版本,即 x86 x64

CefSharp uses VC++ 2012 for which you need to install the redist on the client machines or include the relevant files in your bin directory. Make sure you install the matching version, either x86 or x64.

您可以从redist > https://support.microsoft.com/zh-cn/kb/2977003

You can download the redist from https://support.microsoft.com/en-us/kb/2977003

也请参见此常见问题解答条目,如果您希望将libs包含在应用程序中。
https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#6-how-do-i-include-the-visual-studio -c-2012-redistributables-on-the-target-app

Also see this FAQ entry should you wish to include the libs as part of your app. https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#6-how-do-i-include-the-visual-studio-c-2012-redistributables-on-the-target-app

这篇关于使用CefSharp WinForms时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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