CefSharp.OffScreen.NETCore with Azure Function

0

I am trying to create an Azure function, which takes an url and then returns a screenshot of the page. I have added the package CefSharp.OffScreen.NETCore to the project and the code from CefSharp.MinimalExample for generating a screenshot. Running this in a simple Core console application works as intended, but when run as an Azure Function i get the following error:

System.Private.CoreLib: Exception while executing function: HttpExample. CefSharp.Core: Could not load file or assembly 'CefSharp.Core.Runtime, Version=88.2.90.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138'. An attempt was made to load a program with an incorrect format. System.Private.CoreLib: An attempt was made to load a program with an incorrect format. (0x8007000B).

azure-functions
cefsharp
cefsharp.offscreen
asked on Stack Overflow Mar 19, 2021 by stefan

1 Answer

1

Sorry I didn't reproduce your issue. As far as I know, Azure Function runs on 32 bit OS, which might not match your assembly.

As you said, your project works well on locally, please check the differences between your local environment and Function App's environment.

answered on Stack Overflow Mar 19, 2021 by Doris Lv

User contributions licensed under CC BY-SA 3.0