0

So a quick background - I am running an application called OpenFace - a facial behavior analysis toolkit. Its written in C++ but they have COM interops which allows me to use it within a NET framework realm. I have it working fine locally via .NET Framework 4.7.2 console application.

Running this via an Azure Function is ideal - barrier it with an API. I have successfully got it debugging as an Azure Function:

enter image description here

HOWEVER, this wasnt very straightforward to get working. I had to manually download version 1.0.19 x64 and point the debug executable to the func.exe.

enter image description here

For some reason the x64 version doesnt appear within 1.0.20? Anyway version 1 is required as this isn't NET Core ready.

To publish I ensured the x64 platform was set correctly and runtime version set to 1:

enter image description here

enter image description here

However as per my original error locally (before resolving by using x64 func.exe) I get the error on the server

_Could not load file or assembly 'CppInerop.dll' or one of its .....

Just a FYI, I think tools 1.0.19 ~ 1.0.12299.0 runtime? I'm going to assume having this version might solve the issue? Or is it sadly that this application wont be able to run on Azure and will need to make another plan?

James Z
  • 12,209
  • 10
  • 24
  • 44
David
  • 693
  • 7
  • 20

1 Answers1

2

from my experience, trying to run "old" things using Azure Functions v1 is a nightmare due the conflict of your projects dependencies and Azure Functions runtime dependencies. They had to "freeze" some package versions in order to keep things working. My recommendation: you can move everything to Azure Container Instance (ACI) and use your current Azure Function just to call the ACI.

Thiago Custodio
  • 17,332
  • 6
  • 45
  • 90
  • Thanks so much for the comment. I have in the mean time moved over to Azure functions version 3 - in particular early work with NET Core 3.1 and all their additions with C++ https://devblogs.microsoft.com/cppblog/the-future-of-cpp-cli-and-dotnet-core-3/ Its working :) Cutting edge but we got time before we go to production. – David Nov 11 '19 at 09:41