CefSettings Constructor failed

Having problems with building or using the CefSharp .NET binding? Ask your CEF-related questions here. Please ask general usage questions on StackOverflow.

Moderator: amaitland

CefSettings Constructor failed

Postby Jeff » Fri Apr 09, 2021 5:15 am

I tried to move my code to another pc, and found it did not work. And It quit when try run the constructor code of CefSettings with follow errors.

var settings = new CefSettings();

Error Message:
021/04/09 17:34:34 at CefSharp.CefSettingsBase..ctor()
at CefSharp.Wpf.CefSettings..ctor() C:\projects\cefsharp\CefSharp.Wpf\CefSettings.cs: line 16


Run it in both Win7 and Win 10. Any one know why and how to fix?

Cef v88.2.90

thanks,
Jeff
Techie
 
Posts: 10
Joined: Fri Apr 09, 2021 5:09 am

Re: CefSettings Constructor failed

Postby amaitland » Fri Apr 09, 2021 2:16 pm

Make sure you have visual c++ installed. This is required on every computer you plan to run CefSharp on.

https://github.com/cefsharp/CefSharp/bl ... me.txt#L26
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: CefSettings Constructor failed

Postby Jeff » Sat Apr 10, 2021 4:10 am

HI, Amaitlad, Thanks for the reply. Yes, right. we have .net framework 4.6.1, and VC++ 2015 redistributable (x64).

And we can it well in my local machine, but failed when move to another one. We checked against the readme file, seem no help.

Any idea, thanks?
Jeff
Techie
 
Posts: 10
Joined: Fri Apr 09, 2021 5:09 am

Re: CefSettings Constructor failed

Postby amaitland » Sat Apr 10, 2021 2:57 pm

Is your application targeting x64? If your app targets x86 or AnyCpu with Prefer32Bit then you'll need to install the x86 version of visual c++.

Not having the correct version/bitness of vc++ installed on a non developer PC is the number one cause of "it works on my pc and not on others", the second most common is not all files are included, click once installer for example doesn't include all the required resources without extra configuration.

If that doesn't work then please provide a stack trace for the exception.
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am

Re: CefSettings Constructor failed

Postby Jeff » Sat Apr 10, 2021 9:18 pm

Cool. It works now after x86 VC++ package installed. Great. Thanks a lot. You are my superman. Amaitland, appreciate. :-)
Jeff
Techie
 
Posts: 10
Joined: Fri Apr 09, 2021 5:09 am


Return to CefSharp Forum

Who is online

Users browsing this forum: No registered users and 20 guests