简体   繁体   English

Windows XP / Server 2003 / VS 2010上的CefSharp

[英]CefSharp on Windows XP / Server 2003 / VS 2010

I am trying to integrate CefSharp in a C# project I am developing in Visual Studio 2010 on Windows XP. 我正在尝试将CefSharp集成到我在Windows XP上的Visual Studio 2010中开发的C#项目中。 Similar errors have been reported by other people running Windows Server 2003. 运行Windows Server 2003的其他人也报告了类似的错误。

  1. I add CefSharp.WinForms via NuGet and it seem to work great. 我通过NuGet添加CefSharp.WinForms,它似乎工作得很好。

  2. I compile and run the app however when I try to load CefSharp I get "A procedure imported by 'CefSharp.Core.dll' could not be loaded." 我编译并运行应用程序但是当我尝试加载CefSharp时,我得到“由'CefSharp.Core.dll'导入的过程无法加载。”

Below is the code I run: 以下是我运行的代码:

        var settings = new CefSharp.CefSettings {
            PackLoadingDisabled = true
        };

        if (Cef.Initialize(settings)) {
            throw new Exception("Failed to initialze CefSharp");
        }

        var browser = new CefSharp.WinForms.ChromiumWebBrowser("http://www.google.com/");
        browser.SetBounds(0, 0, ClientSize.Width, ClientSize.Height);
        Controls.Add(browser);

On the CefSharp FAQ It tells me that I should perform a number of tasks which I have done in order to run on Windows XP, even though XP is not officially supported it says in the FAQ that it works. CefSharp常见问题解答它告诉我,为了在Windows XP上运行,我应该执行许多任务,即使XP没有得到官方支持,它在常见问题解答中说它可以工作。

出现错误消息

项目文件

bin \\ x86 \\ debug中的文件

I think there's a typo/missing word in "Make sure the correct Visual C++ version is installed." 我认为“确保安装了正确的Visual C ++版本”中有一个错字/缺失的单词。

IMHO it should read: "Make sure the correct Visual C++ Redistributable version is installed." 恕我直言,它应该读取:“确保安装了正确的Visual C ++ Redistributable版本。”

It's a reference to another FAQ item: https://github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#Including_vcredist 它是对另一个FAQ项的引用: https//github.com/cefsharp/CefSharp/wiki/Frequently-asked-questions#Including_vcredist

There's a couple of potential problems you should watch for too: 你应该注意几个潜在的问题:

1 - set the browser subprocess path: 1 - 设置浏览器子进程路径:

var settings = new CefSettings {
BrowserSubprocessPath = "CefSharp.BrowserSubprocess.exe"
}; 

2 - set the address/html NOT in your ctor but in the browser.IsBrowserInitialised event (and only after checking the browser is initialised) In short, CEF is BIG FAT dll which takes a while to load up and initialise... We will have this working in no time! 2 - 设置地址/ html NOT不在您的ctor中但在browser.IsBrowserInitialised事件(并且只有在检查浏览器初始化之后)简而言之,CEF是BIG FAT dll需要一段时间才能加载并初始化......我们将让这个工作在任何时候!

Same issue here. 同样的问题在这里 REALLY REALLY annoying. 真的很烦人。 I tried dependency walker and it did not give me any relevant information. 我试过依赖沃克,它没有给我任何相关的信息。 All the tutorials are not giving relevant information. 所有教程都没有提供相关信息。 I'm pretty sure it's impossible, at least with the nuget package. 我很确定这是不可能的,至少对于nuget包。

I had problem solved that topic. 我有问题解决了这个话题。

https://groups.google.com/forum/#!searchin/cefsharp/xp/cefsharp/J5gX7OKf7Rc/EoB3h0UmfYYJ https://groups.google.com/forum/#!searchin/cefsharp/xp/cefsharp/J5gX7OKf7Rc/EoB3h0UmfYYJ

If you have VS2013 and some time, you could try building from source with a minor modifications. 如果您有VS2013并且有一段时间,您可以尝试从源代码构建并进行微小修改。

  • Make sure you build in Release mode when deploying to XP/2003 在部署到XP / 2003时,请确保您在Release模式下构建
  • Change the two c++ projects Platform Toolset to Visual Studio 2013 - Windows XP (v120_xp) 将两个c ++项目Platform Toolset更改为Visual Studio 2013 - Windows XP (v120_xp)
  • Make sure the machine your deploying to has VC++ 2013 Redist installed. 确保部署到的计算机安装了VC++ 2013 Redist

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 RegisterHotkey 仅适用于 WIndows 7,不适用于 XP、服务器 2003 - RegisterHotkey only working in WIndows 7, not in XP, server 2003 通知图标可以在Windows XP中正常工作,但不能在Windows Server 2003中正常工作 - Notify icon working fine in windows XP but not in windows server 2003 为什么文件夹在Windows XP和Windows Server 2003上被锁定? - Why folders are locked on Windows XP and Windows Server 2003? 应用程序在Windows XP下运行,但不在Server 2003 R2下运行 - Application runs under windows xp but not under server 2003 r2 如何在Windows Server 2003和Windows XP中延迟创建的服务? - How can I delay my created service in Windows Server 2003 & Windows XP? 无法在某些Windows XP / Server 2003计算机上建立HTTPS连接 - Can't establish HTTPS connections on some Windows XP/Server 2003 machines Windows7 中的 VS 2010 设计器错误“找不到类型 XYZ”。 在 XP 中工作正常 - VS 2010 designer error 'Could not find type XYZ' in Windows7. Works fine in XP Windows Server 2003的BackgroundWorker限制 - BackgroundWorker limitation on Windows server 2003 审核Windows Server 2003文件夹 - Auditing Windows Server 2003 folders Environment.GetFolderPath(...CommonApplicationData) 在 XP 和 Server 2003 上返回空字符串 - Environment.GetFolderPath(…CommonApplicationData) returning Empty string on XP and Server 2003
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM