1

I am trying to build a WinForms class library including CefSharp as a single .dll file.

I installed CefSharp 81.3.100.0 and Costura.Fody via NuGet.

The compiled .dll file is working as an addon to an existing WinForms application. When I try to access the form which uses CefSharp in the Application, I do get the error message:

{"The file or assembly \"CefSharp.WinForms, Version=81.3.100.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138" or a reference of it was not found. The system cannot find the given file.

Does anybody have an idea, how to solve this?

Thanks in advance.

Regards Lars

Gardinero
  • 331
  • 2
  • 13
  • CefSharp involves a lot of C++/CLI, and Cef itself is native and needs a bunch of its DLLs available on disk. I doubt the approach that Fody.Costura takes of hooking into the assembly load mechanism will work for those. I think the only possible thing that could work is something that extracts all of the embedded assemblies to disk (*in the right place*) on startup, which probably doesn't exist (that "right place" is probably next to the exe, which might not be writable) – canton7 May 28 '20 at 13:52
  • Having said that, read the stuff at the bottom of the README about mixed-mode assemblies and native assemblies. However, IIRC Cef/CefSharp needs a bunch of stuff that aren't even assemblies – canton7 May 28 '20 at 14:01

0 Answers0