最近用CefSharp做了一个外壳,随之出现了一个很怪的问题

ANARYI 2014-11-06 05:45:05
代码是在这个网址上:https://github.com/cefsharp/CefSharp 下载的。
情况大致上是这样的,直接打开输出流里的EXE文件会直接报错,但是用VS打开并编译后却能正常使用了。并且在编译完成后,直接打开输出流里的EXE文件也没有问题了。可是一打包情况又变成了一开始那样,一开始我以为是我的机子出问题了,后来把在项目和打包好的软件在同事的机子上试了试,发现都出现了和我一样的问题。

最后我在Program.cs里做了个错误抛出,结果抛出的错误如下:
System.IO.FileNotFoundException;Coloud not load file or assembly 'CefSharp.core.dll' or one of its dependencies,找不到指定的模块。
File name:'CefSharp.Core.dll'

看起来和注册DLL也应该没啥关联,因为打开VS后也仅仅是编译了一次就能用了。请问到底这是怎么一回事呢?
...全文
17906 18 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
RunQuicklyTeemo 2018-11-27
  • 打赏
  • 举报
回复
csharp的版本问题,不支持xp系统,你可以换成支持xp系统的版本
Rubber峰 2018-10-23
  • 打赏
  • 举报
回复
首先,我都是用NuGet弄得外部库,都是自动的,其次,不是自动的话,你确认下dll是否有。打包也可能没打这个dll,保存很明显了。
吹风的兔子 2018-05-17
  • 打赏
  • 举报
回复
360 软件关键,搜索: C++ ,排在第一位的就是。

qq_22725765 2017-06-07
  • 打赏
  • 举报
回复
引用 7 楼 ml232528 的回复:
回复楼主:差 msvcp120.dll msvcr120.dll这两文件 回复5楼xp问题:你必须使用vs2010编译所有dll(c++版本的dll,c#的不用)后才能在xp下运行。
正解,但需要将 msvcp120.dll msvcr120.dll 拷贝至C:\Windows\System32
waising 2017-02-10
  • 打赏
  • 举报
回复
引用 13 楼 annliu310 的回复:
我用visual studio installer打包的时候可以把其他的比如.pak文件一起加进去,用生成后的安装包没问题。但是用clickone发布的时候不知道怎么把.pak这类的文件加进去导致不能用。求解决办法啊。
要把相对应的文件放到exe对应位置 然后把pak文件属性生成操作改为内容
annliu310 2017-01-13
  • 打赏
  • 举报
回复
我用visual studio installer打包的时候可以把其他的比如.pak文件一起加进去,用生成后的安装包没问题。但是用clickone发布的时候不知道怎么把.pak这类的文件加进去导致不能用。求解决办法啊。
淡如晨风 2016-05-09
  • 打赏
  • 举报
回复
VC++组件也安装了,所有的dll也都有,为何运行的时候还是会报这个错误,有遇到的吗???谢谢
code旅行者 2016-02-19
  • 打赏
  • 举报
回复
引用 8 楼 Running_Zhang 的回复:
下载文档有说明: Basic Troubleshooting: - Minimum of .Net 4.0 Client Profile - Make sure `VC++ 2012 Redist Update 4` is installed (either `x86` or `x64` depending on your application) - Please ensure your binaries directory contains these required dependencies: * libcef.dll (CEF code) * icudtl.dat (Unicode Support data) * CefSharp.Core.dll, CefSharp.dll, CefSharp.BrowserSubprocess.exe, CefSharp.BrowserSubProcess.Core.dll - These are required CefSharp binaries that are the common core logic binaries of CefSharp. * One of the following UI presentation approaches: * CefSharp.WinForms.dll * CefSharp.Wpf.dll * CefSharp.OffScreen.dll - Additional optional CEF files are described at: https://github.com/cefsharp/cef-binary/blob/master/README.txt#L88 NOTE: CefSharp does not currently support CEF sandboxing so wow_helper.exe is not currently useful.
谢谢,解决了我的问题。我的情况是VC++的一个组件未安装,就是上述文档的第二条。
liumingqiu32 2015-11-24
  • 打赏
  • 举报
回复
将icudt.dll,libcef.dll这两个Dll放置在bin/Debug或者bin/Release目录下
chinanewsoft 2015-10-05
  • 打赏
  • 举报
回复
8楼正解,用nuget管理包依赖,如果还有问题那就是vc++运行环境没装上
张朋举H 2015-09-07
  • 打赏
  • 举报
回复
下载文档有说明: Basic Troubleshooting: - Minimum of .Net 4.0 Client Profile - Make sure `VC++ 2012 Redist Update 4` is installed (either `x86` or `x64` depending on your application) - Please ensure your binaries directory contains these required dependencies: * libcef.dll (CEF code) * icudtl.dat (Unicode Support data) * CefSharp.Core.dll, CefSharp.dll, CefSharp.BrowserSubprocess.exe, CefSharp.BrowserSubProcess.Core.dll - These are required CefSharp binaries that are the common core logic binaries of CefSharp. * One of the following UI presentation approaches: * CefSharp.WinForms.dll * CefSharp.Wpf.dll * CefSharp.OffScreen.dll - Additional optional CEF files are described at: https://github.com/cefsharp/cef-binary/blob/master/README.txt#L88 NOTE: CefSharp does not currently support CEF sandboxing so wow_helper.exe is not currently useful.
飞翔的薄荷 2015-08-27
  • 打赏
  • 举报
回复
回复楼主:差 msvcp120.dll msvcr120.dll这两文件 回复5楼xp问题:你必须使用vs2010编译所有dll(c++版本的dll,c#的不用)后才能在xp下运行。
ghui 2015-07-31
  • 打赏
  • 举报
回复
如果编译的目标是 x86,安装 Visual C++ Redistributable for Visual Studio 2012 (x86)。 如果编译的目标是 x64,安装 Visual C++ Redistributable for Visual Studio 2012 (x64)。
狮主 2015-04-23
  • 打赏
  • 举报
回复
在 Win7 下都没问题,但在 XP 下却都是提示FileLoadExction "CefSharp.Core.dll" 的异常。 不管 XP 下是装 VC++ 2013 的支持库还是注册 DLL,都还是这个问题。
qq523870222 2015-04-16
  • 打赏
  • 举报
回复
我遇到一样问题,有人说是C++ 包的原因,我是用vs 2013 做的,装过vs 2013 的机子都可以。
葫芦娃的博客 2015-04-16
  • 打赏
  • 举报
回复
请问大神 问题解决了吗
netstart188 2015-02-02
  • 打赏
  • 举报
回复
要编译成X86
xk280399649 2014-11-06
  • 打赏
  • 举报
回复
'CefSharp.core.dll 中有别的依赖项,你仔细看看

111,095

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧