henrivain / TesseractOcrMaui

Tesseract wrapper for Windows, Android and iOS for .NET MAUI
Apache License 2.0
37 stars 4 forks source link

Nuget package does not copy native libraries to build output on Windows #8

Closed henrivain closed 1 year ago

henrivain commented 1 year ago

Output bin folder does not have lib -folder inside

image

Also can't find them by searching

image

With project reference everything works fine, but with nuget package dll cannot be loaded.

Android works fine.

Affected platforms: Windows

henrivain commented 1 year ago

Added package path whilst running pack build in release mode

<ItemGroup Condition="'$(Configuration)' == 'Release' ">
    <Resource Include="lib\Windows\x86_64\*.dll" Pack="true" PackagePath="lib\net7.0-windows10.0.19041\">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    <PackageCopyToOutput>true</PackageCopyToOutput>
    </Resource>
</ItemGroup>

Also copy windows dlls to output directory for debugging repository project

Change dll import dll name to point to output dir on windows

henrivain commented 1 year ago

Fixed in v1.0.6