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:
Microsoft.ML.OnnxRuntime
Microsoft.ML.OnnxRuntime.MKLML
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”);
text.Dump();
@nielsbosma
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.
@nielsbosma
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.
I’m using Linqpad5 (.Net Framework) on Windows 10. AsposeOcr 21.3.
@nielsbosma
We have tried to run LinqPad 5 (with AnyCpu version). This version supports .NET Framework only and does not allow to switch on x64 mode (only AnyCpu). So we have got the same error.
Aspose.OCR for .NET Framework does not support AnyCPU. You have to specify x64 directly.
https://delphidotnet.com/msdotnet/8836-linqpad-6915-x64-linqpad-54300-any-cpu-premium.html
----environment:
LinqPad 5.43 AnyCPU Premium addition
.Framework 4.7.1
Win 10