How to use CefSharp?

2,885 views
Skip to first unread message

Michael

unread,
Mar 14, 2013, 6:13:30 AM3/14/13
to cefs...@googlegroups.com
How to use a browser?
Where I can find these few magic lines to explain? Something like:
1. include ?????.dll in your project
2. using CefSharp; (?)

3. WebView1.Load("www.example.com");

I can't use web browser in my project in WPF!!! (VS2010Exp)
 
I already have the errors after adding libraries and code on the form:
<Window ...
       xmlns:cs="clr-namespace:CefSharp.Wpf;assembly=CefSharp.Wpf" ...>
       <DockPanel>
                    <cs:WebView x:Name="web_view">...
 
error: Type cs:WebView not found. Missing an assembly reference...
But I already added CefSharp.dll and CefSharp.Wpf.dll
 
Thanks in advance for any help!

anthony taranto

unread,
Mar 14, 2013, 3:00:14 PM3/14/13
to cefs...@googlegroups.com
you need to add the libcef and icudt dlls.

--
You received this message because you are subscribed to the Google Groups "CefSharp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cefsharp+u...@googlegroups.com.
To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Patrick Fellner

unread,
Jun 5, 2013, 3:16:23 AM6/5/13
to cefs...@googlegroups.com
if i try to add them i get this message

at reference to C:\.....\icudt.dll could not be added. Please make sure that the file is accessible and that it is a valid assembly or COM component

for libcef.dll the same
Message has been deleted

Soenhay

unread,
Jun 5, 2013, 10:40:07 AM6/5/13
to cefs...@googlegroups.com
The dlls need to be in the executable path when the project is published. You can add them to the project at the top level and that should work. In visual studio this can be done by right clicking on your project in the solution explorer then click "add" then "existing item".

CefSharp and CefSharp.WinForms( or WPF) should be added as references.

Patrick Fellner

unread,
Jun 6, 2013, 1:08:51 AM6/6/13
to cefs...@googlegroups.com
I've already tried that then i get an XamlParseException  when i try to debug


2013/6/5 Soenhay <jo...@qsronline.com>
You received this message because you are subscribed to a topic in the Google Groups "CefSharp" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cefsharp/sYcMrA-8V9Y/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cefsharp+u...@googlegroups.com.

To post to this group, send email to cefs...@googlegroups.com.
Visit this group at http://groups.google.com/group/cefsharp?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Mit freundlichen Grüßen



Patrick Fellner

Fabien Fleurey

unread,
Jul 5, 2013, 9:20:46 AM7/5/13
to cefs...@googlegroups.com, fellnerp...@googlemail.com
I'm stuck for few hours on the exactly same issue, is anybody can share how to get rid of this?
Thanks.

Lundberg, Per

unread,
Jul 5, 2013, 11:15:21 AM7/5/13
to <cefsharp@googlegroups.com>, cefs...@googlegroups.com, fellnerp...@googlemail.com
Hi,

CefSharp depends on a number of files, including libcef.dll and icudt.dll. These are not .NET assemblies but rather unmanaged Win32 DLLs. Therefore you cannot directly reference them from your project, but as previously stated they must exist in your bin\Debug or bin\Release folder when running.

To better understand how this stuff fits together, clone/download the code from Github (either ataranto's repo or mine). There in the Debug and Release folders you see what files are needed to run. (The locales folder and devtools_resources must also be present.)

We know this is a bit awkward; it could possibly be simplified in the future. Anyone wishing to work on these parts: try embedding the unmanaged files as resources in CefSharp and load them manually on startup... Should definitely be doable.

Best regards,
Per

Sent from my iPhone

Fabien Fleurey

unread,
Jul 8, 2013, 9:51:29 AM7/8/13
to cefs...@googlegroups.com, fellnerp...@googlemail.com
Hi, 

I have tried all the day to make this working, I tried what you said in your message and here https://github.com/perlun/CefSharp/blob/master/README.WPF.md (sorry I missed this readme before posting my first question). But I'm stuck on the same issue. When I run in debug with visual studio I'm getting:  



My debug folder contains:
  • locales
  • avcodec-54.dll
  • avformat-54.dll
  • avutil-51.dll
  • CefSharp.dll
  • CefSharp.Wpf.dll
  • devtools_resources.pak
  • icudt.dll
  • libcef.dll
  • libEGL.dll
  • libGLESv2.dll
Note if I run "manualy" the exe in the debug folder, it also fails.

As far I understand, it fails to found the dependency CefSharp.Wpf but in Visual the reference is well marked to resolved (as you can see on the screenshot) and if I try a using in code for example, it's well reconized.

I tried with: 
  • Visual Studio 2010 C# Express
  • Visual Studio 2008 C# Express
  • Visual Studio 2010 Ultimate
Also I tried to compile your whole sources but again without success.

I'm not a .NET developer so I haven't a good understanding of build process on Windows/with Visual, maybe I missing something obvious here.

Anyway your work looks quite awesome and for now my better option to ingrate a WebGL viewer on Windows.

Fabien Fleurey

unread,
Jul 8, 2013, 12:37:00 PM7/8/13
to cefs...@googlegroups.com, fellnerp...@googlemail.com
Ok I found the issue...

It doesn't work with the .NET framework 4 but works fine with .NET framework 3.5.
Is anabody can explain to me what happen? And how I can get this worked with .NET 4 or 4.5?

Thanks, and sorry for the previous messages. 

Rupak Sarkar

unread,
Jul 10, 2013, 2:09:03 PM7/10/13
to cefs...@googlegroups.com, fellnerp...@googlemail.com
Hi, i am just interested to know how to load libcef.dll from any directory other that Release/Debug folder. Any config settings is required?
Regards,
Rupak.

per.lu...@ecraft.com

unread,
Jul 16, 2013, 12:14:28 PM7/16/13
to cefs...@googlegroups.com, fellnerp...@googlemail.com
Hi,

It could be done, but you would have to use some manual LoadLibrary tricks to get it done. I don't know if anyone has experimented with this, but I'm quite certain it is doable with a bit of effort.

Best regards,
Per
Reply all
Reply to author
Forward
0 new messages