Free Support Forum -

Unable to find an entry point named 'OrtGetApiBase' in DLL 'onnxruntime'

When trying to use Aspose.OCR, I’m gettting exception:

The type initializer for ‘Microsoft.ML.OnnxRuntime.NativeMethods’ threw an exception.
Unable to find an entry point named ‘OrtGetApiBase’ in DLL ‘onnxruntime’.

I’ve read some previous post about adding:


But that doesn’t work either.

You can easily reproduce this by creating a LinqPAD script with Aspose.OCR nuget and:

var lib = new AsposeOcr();
var text = lib.RecognizeLine(@“C:\Users\niels\Desktop\Screenshot_3.png”);


We have logged an investigation ticket as OCRNET-340 in our issue tracking system. We will further look into its details and determine the cause of this error. You will be informed as soon as the ticket is resolved. Please give us some time.

We are sorry for the inconvenience.


We have run some tests at our end and did not find any issue. We tested the API in an environment i.e.

  • OS: Windows 10
  • Installed: .Net Core 3.1
  • LinqPad 6.11.11 Premium
  • in NUGET added Aspose.Ocr 21.3

image_2021_04_12T12_23_43_486Z.png (52.8 KB)
image_2021_04_12T12_24_19_025Z.png (15.6 KB)

Could you please share the complete environment details in which you are facing the issue so that we can further proceed to assist you accordingly.