简体   繁体   中英

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. Similar errors have been reported by other people running Windows Server 2003.

  1. I add CefSharp.WinForms via NuGet and it seem to work great.

  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."

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.

出现错误消息

项目文件

bin \\ x86 \\ debug中的文件

I think there's a typo/missing word in "Make sure the correct Visual C++ version is installed."

IMHO it should read: "Make sure the correct Visual C++ Redistributable version is installed."

It's a reference to another FAQ item: 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:

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!

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.

I had problem solved that topic.

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.

  • Make sure you build in Release mode when deploying to XP/2003
  • Change the two c++ projects Platform Toolset to Visual Studio 2013 - Windows XP (v120_xp)
  • Make sure the machine your deploying to has VC++ 2013 Redist installed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM