cefsharp / Questions-and-Support

Use this repository to ask CefSharp specific questions
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Could not load file or assembly 'CefSharp.Core.DLL' or one of its dependencies #74

Closed yvef closed 3 years ago

yvef commented 3 years ago

Do I know to clarify some point?

Thanks.

amaitland commented 3 years ago

Does Microsoft project use Appdomains to load add-ins?

If so then it's unlikely you'll be able to get CefSharp running in the same process, see https://stackoverflow.com/a/58077862/4583726 for background.

yvef commented 3 years ago

@amaitland Thank you for the info!

amaitland commented 3 years ago

If you can load the browser into the default appdomain then you can make it work.

Try checking https://docs.microsoft.com/en-us/dotnet/api/system.appdomain.isdefaultappdomain?view=net-5.0

You can manually call Assembly.Load to pre-load CefSharp.Core.dll or use https://docs.microsoft.com/en-us/dotnet/api/system.appdomain.assemblyresolve?view=net-5.0 with Assembly.Load

See https://github.com/cefsharp/CefSharp/issues/1714#issuecomment-227041722 for an example of AppDomain.CurrentDomain.AssemblyResolve