0

I have a VB.NET project (WinForms) which uses the CefSharp libraries and I want to apply the AnyCPU support using the option 4 based on the guide mentioned here.

Based on the requirements,

  • I'm not including the "CefSharpAnyCpuSupport" in the project file.
  • My application has an "app.config"
  • My copy of Visual Studio (2013) has the "Web Developer Tools" installed.
  • My CefSharp version is greater than the needed v87.1.132

It is written that based on the above, the generated "app.config" on the "bin" folder will include the below section but in my case I'm not getting anything.

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
        <assemblyIdentity name="CefSharp.Core.Runtime" processorArchitecture="x86" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
        <codeBase version="89.0.170.0" href="x86/CefSharp.Core.Runtime.dll"/>
    </dependentAssembly>
    <dependentAssembly>
        <assemblyIdentity name="CefSharp.Core.Runtime" processorArchitecture="amd64" publicKeyToken="40c4b6fc221f4138" culture="neutral"/>
        <codeBase version="89.0.170.0" href="x64/CefSharp.Core.Runtime.dll"/>
    </dependentAssembly>
</assemblyBinding>

Does anyone has tried to implement this specific option? I'm missing something? In order to trigger the generation process, I added the following line into the project file but without any positive result.

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v12.0\Web\Microsoft.Web.Publishing.targets" />

Any suggestions are welcome. Thanks!

Andreas
  • 23
  • 3
  • VS2013 is not a version I test with so not surprised it doesn't work out of the box. https://github.com/cefsharp/CefSharp/blob/master/NuGet/CefSharp.Common.targets#L89 and https://github.com/cefsharp/CefSharp/blob/master/NuGet/CefSharp.Common.targets#L356 Are the two relevant places in the targets file. Does Microsoft.Web.Publishing.Tasks.dll exist ? – amaitland Jan 28 '22 at 19:35
  • Yes, exists on the same location I mentioned on the "Import Project" line. What are you suggesting to do? – Andreas Jan 31 '22 at 06:49
  • amaitland: I noticed in the "CefSharp.Common.targets" file that you are using the Nuget "packages.config" in order to set the value of the "CefSharpBuildAction" property. I'm not using this file in my project. I just added all the needed CefSharp files manually. Is any workaround for this issue? – Andreas Jan 31 '22 at 13:54
  • If you aren't using the Nuget package then you cannot use any of the features it offers. You will need to manually implement your own transform. Or use a different option, I'd suggest option 2. – amaitland Jan 31 '22 at 19:44
  • amaitland: On your project file of the "CefSharp.MinimalExample.WinForms" (https://github.com/cefsharp/CefSharp.MinimalExample/tree/master/CefSharp.MinimalExample.WinForms), you are setting manually the "Content". Can I do the same without using the Nuget files? – Andreas Feb 04 '22 at 09:54
  • If you haven't installed the Nuget package then setting CefSharpBuildAction will do nothing. – amaitland Feb 04 '22 at 19:52

0 Answers0