-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Could not load file or assembly 'CefSharp.Core.dll' or ..." when running CefSharp.Wpf.Example from another project #466
Comments
@KennyKay Can you confirm the bin folder for your project has all the supporting Cef libraries present? The error above is often misleading, typically seen when |
My suggestions for troubleshooting: As amaitland mentioned, make sure all the DLLs are present in the BIN of whichever project is actually the executing application as in your case the WinForms app you've made will need all the DLLs present in its bin folder. If it doesn't reference the nuget packages directly and is relying on the Wpf.Example references then the native DLLs might be getting copied to the Wpf.Example instead of your Winforms bin folder. You can have issues loading CefSharp.Core.dll if some of the native dlls are missing. |
@amaitland I tried the PR #465 and it does not crash on startup. I did some tests with the browser and I found out that when running it in ElementHost.EnableModelessKeyboardInterop(wpf), the browser doesn't receive any keyboard input but the mouse works. ( Same issue with the master branch) Also, it happens sometimes that the browser crash on window closing: |
I've merged #465 into
Issue #362 has some info on the problem, the only fix I know of at this stage is to open the Wpf Window as model. Is there are a specific reason your using the
protected virtual void Dispose(bool isdisposing)
{
GotKeyboardFocus -= OnGotKeyboardFocus;
LostKeyboardFocus -= OnLostKeyboardFocus; |
I do have a PR that's waiting for review that has the relevant dispose changes applied to it already if your interested, it's #412 I've just merged the latest |
@amaitland I tested PR #469 and it fixes the dispose bug. For now, I will be using the Wpf browser without a WinForm (Call from the program.cs) to have the keyboard inputs and all the RenderTransform functions on the browser control. Thanks |
ey I am not able to use the cefSharp in my Xaml file. I get a error as {"Could not load file or assembly 'CefSharp.Core, Version=63.0.3.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138' or one of its dependencies. The system cannot find the file specified.":"CefSharp.Core, Version=63.0.3.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138"} |
@Pkotian80 I am also facing the same problem . Please share if you have found the solution. |
I installed the applicable Visual C++ Runtime and it started working for me |
When I run the CefSharp.Wpf.Example project from another WinForms project , it crashes on the CefExample.Init() call even though all the necessary references are added.
I added the CefExample.Init() call in the constructor of the MainWindow.xaml.cs.
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in CefSharp.Wpf.Example.exe
Additional information: Could not load file or assembly 'CefSharp.Core.dll' or one of its dependencies. The specified module could not be found.
My main goal is to be able to show the Wpf CefSharp browser from a WinForms application using the WPF integration in WinForms (http://weblogs.asp.net/jdanforth/open-a-wpf-window-from-winforms):
var wpfwindow = new MainWindow();
ElementHost.EnableModelessKeyboardInterop(wpfwindow);
wpfwindow.Show();
It works fine when I start the CefSharp.Wpf.Example project although it doesn't work when running it from another project. The configuration of all project are set to x86 .Net 4.
Am I doing anything wrong or is it an issue?
Thanks.
The text was updated successfully, but these errors were encountered: