Exception thrown on Import Vector

Hi. I am trying to import vector from a shapefile I exported from qgis. An exception is thrown when it reads the file:

  1. Solution exception:The type initializer for ‘RESTful.GdalConfiguration’ threw an exception.

I saw there was another topic about this particular issue but after many attempts to uninstall, reinstall, and revert to an older version I have been unsuccessful. I am using 0.4.1 installed from package manager.

Hi @Graham_Felton,

Have you tried reaching out to the developer of the component?

– Dale

Hi @Graham_Felton ,
Have you tried the steps in this post?


Hey Brian,

Yes, after changing to load directly from the disk the error does not change.

Unlike that original post it seems Heron installed with data and share folders

Can you try moving the Heron folder from the Package Manager directory to the GH Components Libraries directory?

Yeah, same error from the looks of it.

Apologies, but I’m out of suggestions. @dale is there someone at McNeel I can reach out to for help with this issue?


Hi @Brian_Washburn,

Its not clear to me what the problem is. Is the custom component yours?

– Dale

Hi @dale ,
Yes, I’m the developer of Heron. Heron is built on GDAL (c# bindings pulled in from nuget) which generates a folder of dependencies required for it to run and which are packaged with Heron releases as a subfolder. It seems when GDAL can’t find the subfolder, GDAL throws the type initializer error.

A GdalConfiguration.cs comes with the GDAL bindings telling GDAL where to look for the dependencies. I had been using Assembly.Location to get the executing directory which seems to work in many cases, but apparently not all. It had never been an issue until I started releasing through the package manager. The code below is the latest attempt to fix the issue, but has not yet been released, so the version 0.4.1 that @Graham_Felton is using has the commented out parts active.

GdalConfiguration.cs in the Heron Github Repo

As is likely evidenced in my code, I’m wouldn’t call myself a programmer, just a hack, so there could easily be other reasons the error is thrown. I appreciate any help you can provide.