2

Cefsharp Version: 91.1.211

The only way thus far I've been able to successfully use clickonce with cefsharp is to put its dependencies in the root directory with Built action set to CONTENT and Copy to Output directory set to Always.

But this is really sloppy, I would rather have those dependencies at least in a sub directory but then cefsharp will no longer work on deployement.

Is it possible to have these dependencies in a sub directory like /Cefsharp_Dependencies and then have them be deployed to the root directory on publish or have cefsharp look for these dependencies in a subdirectory?

Watson
  • 1,385
  • 1
  • 15
  • 36
  • 1
    What exactly did you do to include the files as content? CefSharp has an option for including the files as content https://github.com/cefsharp/CefSharp/issues/3319#issuecomment-757106286 for reference https://github.com/cefsharp/CefSharp/blob/cefsharp/91/NuGet/CefSharp.Common.targets#L269 You can specify a subfolder to copy the files into https://github.com/cefsharp/CefSharp/blob/cefsharp/91/NuGet/CefSharp.Common.targets#L110 You can specify a privatePath in your config file, https://github.com/cefsharp/CefSharp/discussions/3371 – amaitland Jul 07 '21 at 03:29
  • The clickonce publish target has some quirks where it leaves files out when they are included multiple times as is required to use the Browsersubprocess from a subfolder, so no guarantees that'll work. – amaitland Jul 07 '21 at 03:31

1 Answers1

2

This works as advertised for me:

To better support ClickOnce/Publish I've added the option to switch from using the entries to this should allow support via a single configuration setting in the proj file.

Add the following to a PropertyGroup in your proj file before the .targets entries (which are at the bottom).

<CefSharpBuildAction>Content</CefSharpBuildAction>

Watson
  • 1,385
  • 1
  • 15
  • 36