You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I can't get my app to work if I publish it as a single file using the visual studio Publish tool.
I think the issue is somehow can't locate the runtime folder (x86, x64),
even though I made sure that both of them and the tessdata folder are located in the same folder as the executable.
BTW, The app works just fine if not built as a single file.
To reproduce the issue:
Either build as a single file or move the runtime files (leptonica-1.82.0.dll, tesseract50.dll) anywhere other than the (x86, x64) folder.
How to fix:
I think if you allow specifying a custom location for the runtime folders (x86, x64) that should fix it.
Stack Trace:
at System.Reflection.ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at InteropDotNet.InteropRuntimeImplementer.CreateInstance[T]()
at Tesseract.Interop.LeptonicaApi.Initialize()
at Tesseract.Interop.TessApi.Initialize()
at Tesseract.Interop.TessApi.get_Native()
at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode, IEnumerable`1 configFiles, IDictionary`2 initialOptions, Boolean setOnlyNonDebugVariables)
at Tesseract.TesseractEngine..ctor(String datapath, String language, EngineMode engineMode)
The text was updated successfully, but these errors were encountered:
You can set the search path to anything however you do still need to deploy
the tesseract and leptonica DLLs these can't be bundled into a single
managed exe as they're native DLLs not dotnet.
On Thu, 23 Feb 2023, 08:05 w4po, ***@***.***> wrote:
I found a fix:
TesseractEnviornment.CustomSearchPath = Environment.CurrentDirectory;
But you still have to put the x86 and x64 in the same folder of your
executable.
—
Reply to this email directly, view it on GitHub
<#636 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB7HSHX7EG6L2W6CCMHZMDWYZ5SJANCNFSM6AAAAAAVEU2SAE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Charles, On a .NET application these files get added and bundled to the project automatically. On framework you must add them manually. Is there a way to add them automatically like in .NET?
Hello,
I can't get my app to work if I publish it as a single file using the visual studio Publish tool.
I think the issue is somehow can't locate the runtime folder (x86, x64),
even though I made sure that both of them and the tessdata folder are located in the same folder as the executable.
BTW, The app works just fine if not built as a single file.
To reproduce the issue:
Either build as a single file or move the runtime files (leptonica-1.82.0.dll, tesseract50.dll) anywhere other than the (x86, x64) folder.
How to fix:
I think if you allow specifying a custom location for the runtime folders (x86, x64) that should fix it.
Stack Trace:
The text was updated successfully, but these errors were encountered: