Winforms CL20R3与CefSharp项目 [英] Winforms CL20R3 with CefSharp Project
问题描述
我对此问题有类似的问题 C#Windows应用事件:应用程序启动时CLR20r3
I have a similar problem to this question C# windows appication Event: CLR20r3 on application start
错误是这样的:
应用程序:MantenedorPlanesMain.exe
框架版本:v4.0.30319
说明:由于未处理的异常,该进程已终止。
异常信息:System.IO.FileNotFoundException
电池:CefSharp.Example.CefExample.Init()中的
CefSharp.WinForms.Example.Program.Main()
p>
Application: MantenedorPlanesMain.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.IO.FileNotFoundException Battery: in CefSharp.Example.CefExample.Init () in CefSharp.WinForms.Example.Program.Main ()
但是只有在某些机器上,例如在我的计算机上,我才可以在没有问题的情况下在办公室的计算机上使用该程序。
But only on some machines, for example, on my computer I can use the program without any problem and in a computer of my office too.
我试图在stackoverflow中找到问题的根源,并意识到该错误是由找不到的cs文件引起的,但在项目内。
I tried to find the source of the problem here in stackoverflow and realized that the error was caused by a cs file not found, but is within the project.
当我去查看 CefSharp.WinForms.Example.Program.cs
并注释的行时CefSharp.Example.CefExample.Init()
在另一个文件中抛出相同的错误。
When I go to see CefSharp.WinForms.Example.Program.cs
and comment the line of CefSharp.Example.CefExample.Init()
throws me the same error in another file.
我尝试了所有操作,甚至是 CopyLocal = true
和 x86
,但仍然无法正常工作。我认为系统语言可能存在问题,这是正常运行的机器(西班牙语系统)的唯一常见因素。
I tried everything, even the CopyLocal = true
and x86
, but still not working. I think there may be a problem with the system language, which is the only common factor of the machines that worked, Spanish language system.
有什么想法吗?
推荐答案
在这种情况下, FileNotFoundException
通常意味着您需要安装 VC ++
或在 Debug
模式下编译的(在以下情况下,您需要以 Release
模式构建:在未安装VS的计算机上运行)
In this context FileNotFoundException
usually means you need to install VC++
or that you compiled in Debug
mode (You need to build in Release
mode when running on a machine without VS installed)
https://github.com/cefsharp/CefSharp/blob/master/NuGet/Readme.txt#L18
另请参阅
Also See the Note
within https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#6-how-do-i-include-the-visual-studio-c-2012-redistributables-on-the-target-app
这篇关于Winforms CL20R3与CefSharp项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!