Closed OWiger closed 3 months ago
Downgrading to version 3.8.3.286 works though. Then I get more files copied to my native folder:
`08/13/2024 12:30 PM
@OWiger The previous version contains all drivers from SDK and VCPKG, even they are not utilised during the runtime. Starting the 3.9.1 version all required dependencies are being collected by a script.
I need more info to investigate this. Please, install and open Git Bash and run ldd gdal.dll
(usually it's located in bin/<Configuration>/net8.0/runtimes/win-x64/native
).
For example: ldd bin/Release/net8.0/runtimes/win-x64/native/gdal.dll
Installed a fresh Win10 on VM and found a missing driver. Let me know if these artifacts work for you (try with local restore) https://github.com/MaxRev-Dev/gdal.netcore/actions/runs/10375191648/artifacts/1808132653
Installed a fresh Win10 on VM and found a missing driver. Let me know if these artifacts work for you (try with local restore) https://github.com/MaxRev-Dev/gdal.netcore/actions/runs/10375191648/artifacts/1808132653
Yes, this works! Thank you!
I'm also having this issue with loading the native dll's.
I'm building a simple .NET 8.0 Console application with MaxRev.Gdal.Core (3.9.1.244) and MaxRev.Gdal.WindowsRuntime.Minimal (3.9.1.244).
Program.cs: using MaxRev.Gdal.Core; GdalBase.ConfigureAll(); Console.WriteLine("Hello, World!");
I build this project in release mode. On my dev-machine, it works fine. Hello world is displayed.
If I copy the entire net8.0 output folder to a freshly created azure VM with Windows 11 (or windows 10), and try to run the application I get:
Unhandled exception. System.TypeInitializationException: The type initializer for 'OSGeo.GDAL.GdalPINVOKE' threw an exception. ---> System.TypeInitializationException: The type initializer for 'SWIGExceptionHelper' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'gdal_wrap' or one of its dependencies: The specified module could not be found. (0x8007007E) at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper.SWIGRegisterExceptionCallbacks_Gdal(ExceptionDelegate applicationDelegate, ExceptionDelegate arithmeticDelegate, ExceptionDelegate divideByZeroDelegate, ExceptionDelegate indexOutOfRangeDelegate, ExceptionDelegate invalidCastDelegate, ExceptionDelegate invalidOperationDelegate, ExceptionDelegate ioDelegate, ExceptionDelegate nullReferenceDelegate, ExceptionDelegate outOfMemoryDelegate, ExceptionDelegate overflowDelegate, ExceptionDelegate systemExceptionDelegate) at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper..cctor() --- End of inner exception stack trace --- at OSGeo.GDAL.GdalPINVOKE.SWIGExceptionHelper..ctor() at OSGeo.GDAL.GdalPINVOKE..cctor() --- End of inner exception stack trace --- at OSGeo.GDAL.GdalPINVOKE.AllRegister() at OSGeo.GDAL.Gdal.AllRegister() at MaxRev.Gdal.Core.GdalBase.ConfigureGdalDrivers(String gdalDataFolder) at MaxRev.Gdal.Core.GdalBase.ConfigureAll() at Program.<Main>$(String[] args) in C:\Users\ow\source\repos\TestGdalApp\Program.cs:line 4
I have the following runtimes and redistributables installed on the vm:
Here's the contents of my native-folder: ` Directory of C:\Users\win11test\Desktop\net8.0\runtimes\win-x64\native
Details
08/13/2024 11:51 AM
Environment information: