solved it. needed to exclude in the csproj the netstandard from the trim
optimization
<TrimmerRootAssembly Include="netstandard" />
On Friday, July 16, 2021 at 11:46:01 AM UTC-4 Taylor Funk wrote:
>
> - dotnet publish -c Release -r win-x64 -p:PublishSingleFile=true
> -p:PublishTrimmed=true --self-contained true
> - when publishing a single .exe in .net 3 I'm getting this error when
> I try to instantiate the engine
> - Could not load file or assembly 'netstandard, Version=2.0.0.0,
> Culture=neutral
> - var engine = new TesseractEngine(keyDir, item.lang,
> EngineMode.Default); works fine when i'm debugging, or if I click the non
> self contained exe file.
> - I don't know if setting the custom search willsolve this. still not
> working though
> var assembly = Assembly.GetEntryAssembly(); var loc =
> assembly.Location; var name = $"{assembly.GetName().Name}.dll"; loc =
> loc.Replace(name, ""); TesseractEnviornment.CustomSearchPath = loc;
>
>
--
You received this message because you are subscribed to the Google Groups
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tesseract-ocr/ac958088-3788-45d5-880d-be5fafeb5d1dn%40googlegroups.com.