Can I use the In-Proc COM COM library with Azure features?
I am migrating my web service to Azure Functions. One component has a dependency on the legacy 32-bit COM DLL. This usually requires the dll to be regsvr32-ed on the system where it will be used. How does this seem impossible with Azure Functions, can such obsolete implementations be used?
Or do I need to revert to the classic cloud service to support this? (My preference would be to use the Consumption service plan and benefit from the serverless architecture.)
Steps:
- Create a new Azure Feature app
- Add new Azure feature (http trigger)
- Add a link to a 32-bit COM component
- Call a simple test method for a COM component
- Run locally - works great
- Publish Azure Feature
- Open HTTP function path - Azure function not working
Log error reporting exception:
Failed to load file or assembly 'Interop.MyCOMLib, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null' or one of its dependencies. The system cannot find the specified file.
: Legacy Microsoft.Azure.WebJobs.Host.FunctionInvocationException: : Legacy --- > System.IO.FileNotFoundException: 'Interop.MyCOMLib, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = null . . .Legacy.Run(HttpRequestMessage req, TraceWriter) System.Runtime.CompilerServices.AsyncTaskMethodBuilder 1.Start [TStateMachine] (TStateMachine & stateMachine) Functions.Legacy.Run(HttpRequestMessage req, TraceWriter) lambda_method (Closure, Legacy, Object [])
Microsoft.Azure.WebJobs.Host.Executors.TaskMethodInvoker 2.InvokeAsync(TReflected , Object []) async Microsoft.Azure.WebJobs.Host.Executors.FunctionInvoker 2.InvokeAsync [TReflected, TReturnValue] ( , Object []) async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.InvokeAsync(IFunctionInvoker invoker, ParameterHelper parameterHelper, CancellationTokenSource timeoutTokenSource, CancellationTokenSource functionCancellationTokenSource, Boolean throwOnTimeout, TimeSpan timerInterval, IFunctionInstance) async Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithWatchersAsync(IFunctionInstance instance, ParameterHelper parameterHelper, TraceWriter traceWriter, CancellationTokenSource functionCancellationTokenSource)
Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??) Microsoft.Azure.WebJobs.Host.Executors.FunctionExecutor.ExecuteWithLoggingAsync(??)
, | COM Interop.Lib Embed Interop Types, :
" COM- factory CLSID {D84F92D7-FFFF-4C16-B939-EC98E3A6EBC0} - : 80040154 ( HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))."
, , COM Azure?