0

I am trying to implement custom vision solution using C#, Azure custom vision, and ONNX Model. My API code is running perfect on windows OS, but when I am trying to run same code on Ubuntu 18.04, getting below error.

I have download trained ONNX model from Azure ml.

Unhandled exception. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.DllNotFoundException: Unable to load shared library 'api-ms-win-core-com-l1-1-0.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libapi-ms-win-core-com-l1-1-0.dll: cannot open shared object file: No such file or directory
   at WinRT.Platform.CoIncrementMTAUsage(IntPtr* cookie)
   at WinRT.WinrtModule..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
   at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
   at System.Activator.CreateInstance[T]()
   at System.LazyHelper.CreateViaDefaultConstructor[T]()
   at System.Lazy`1.CreateViaDefaultConstructor()
   at System.Lazy`1.ViaConstructor()
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at System.Lazy`1.get_Value()
   at WinRT.WinrtModule.get_Instance()
   at WinRT.WinrtModule.GetActivationFactory(String runtimeClassId)
   at WinRT.BaseActivationFactory..ctor(String typeNamespace, String typeFullName)
   at Windows.Storage.StorageFile._IStorageFileStatics..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
   at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
   at System.Activator.CreateInstance[T]()
   at WinRT.WeakLazy`1.get_Value()
   at Windows.Storage.StorageFile._IStorageFileStatics.get_Instance()
   at Windows.Storage.StorageFile.GetFileFromPathAsync(String path)
   at CustomVisionAPI.Controllers.HomeController.Run() in /home/aaa/bbb/CutomVision/WebApplication1/Controllers/HomeController.cs:line 44
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi)
   at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
John Conde
  • 217,595
  • 99
  • 455
  • 496

1 Answers1

0

This doesn't look like an onnxruntime issue at all.

pranavsharma
  • 1,085
  • 2
  • 10
  • 18
  • 1
    i think i need to give the proper path in LD_DEBUG . But i don't know how to do this? Please if you have any idea then let me know. Thank you – Dimpal Solanki Mar 30 '21 at 04:47