I am working on an Azure Function that utilizes the Esri ArcGIS Runtime SDK for .NET. The function runs locally without issues, but when deployed to Azure Functions (Windows - x64 platform), I encounter the following error:
Microsoft.Azure.WebJobs.Script.Workers.Rpc.RpcException : Result: Function 'Function1', Invocation id 'ebab821b-dce2-46e5-9da6-386ac334556c': An exception was thrown by the invocation.
Exception: System.TypeInitializationException: The type initializer for 'RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase' threw an exception.
---> System.DllNotFoundException: Unable to load DLL 'RuntimeCoreNet200_6.dll' or one of its dependencies: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail. (0x800736B1)
at RuntimeCoreNet.GeneratedWrappers.CoreArcGISRuntimeEnvironment.<CoreRT_ArcGISRuntimeEnvironment_setInstallDirectory>g____PInvoke|68_0(Byte* __installPath_native, IntPtr* __outErrorHandle_native)
at RuntimeCoreNet.GeneratedWrappers.CoreArcGISRuntimeEnvironment.CoreRT_ArcGISRuntimeEnvironment_setInstallDirectory(String installPath, IntPtr* outErrorHandle)
at RuntimeCoreNet.GeneratedWrappers.CoreArcGISRuntimeEnvironment.SetInstallDirectory(String installPath)
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.InitNative()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.InitializeRuntimeCore()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.OnBeforeFirstUseOfGeneratedWrapper()
at RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase..cctor()
--- End of inner exception stack trace ---
at RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase..ctor(IntPtr handle)
at RuntimeCoreNet.GeneratedWrappers.CoreFeatureTable..ctor(IntPtr handle)
at RuntimeCoreNet.GeneratedWrappers.CoreArcGISFeatureTable..ctor(IntPtr handle)
at RuntimeCoreNet.GeneratedWrappers.CoreServiceFeatureTable..ctor(IntPtr handle)
at RuntimeCoreNet.GeneratedWrappers.CoreServiceFeatureTable..ctor(String uri)
at Esri.ArcGISRuntime.Data.ServiceFeatureTable..ctor(Uri source)
Would appreciate any insights from the community!
Thanks in advance !!