bertt / GdalOnNet8Sample

MIT License
19 stars 4 forks source link

Console test application fails on run #4

Closed SesticM closed 2 years ago

SesticM commented 4 years ago

Bert, console test application (https://github.com/bertt/GdalOnNetCoreSample) throws following exception when run: Unhandled exception. System.EntryPointNotFoundException: Unable to find an entry point named ‘CSharp_OSGeofGDAL_AllRegister___’ in DLL ‘gdal_wrap’.

bertt commented 4 years ago

Hi Maksim, what operating system (windows/mac/linux) do you use?

SesticM commented 4 years ago

It's Windows 10 OS, Visual Studio 2019 (latest revision)

SesticM commented 4 years ago

Oh, I see what's wrong - I already have GDAL_DATA environment setting related to standard GDAL's .NET Framework implementation. It's obviously taken into consideration before ..\netcoreapp3.1\runtimes\win10-x64\native dependencies being shipped by Nuget. To fix this, I copied all ..\native files & folders to Console app's Debug folder and now everything works fine. You might want to add this tiny comment to the project's Readme, or improve referenced dlls probing if possible.

bertt commented 2 years ago

I've updated the sample, it's now using gdal 3.3.3