[gdal-dev] GDAL.NET System.TypeInitializationException

Scott Senften scott at senften.com
Fri Oct 26 14:58:41 PDT 2018


My apologies; I'm guessing this is well trod ground, but I couldn't find a
good search for the archives and, on inspection, I couldn't find an
appropriate topic.

I'm trying to build one of the GDAL swig c# examples, specifically I have
tried both OGRGEOS and ORSTransform. I've installed GDAL.NET 2.3.1 from
nuget (https://www.nuget.org/packages/GDAL.NET/). My projects build but
both throw System.TypeInitializationException at runtime.

For OGRGEOS, the error is

> Exception thrown: 'System.TypeInitializationException' in ogr_csharp.dll
> An unhandled exception of type 'System.TypeInitializationException'
> occurred in ogr_csharp.dll
> The type initializer for 'OSGeo.OGR.OgrPINVOKE' threw an exception.
>
> The program '[34872] dotnet.exe' has exited with code -1073741510
> (0xc000013a).
>

I'm guessing that I either have a configuration issue or a dependency issue
with the underlying native code, but, at this point, I'm just guessing.

Any help would be appreciated,

Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20181026/949e63b5/attachment-0001.html>


More information about the gdal-dev mailing list