I am trying to create a nautical charts layer like so:
new NauticalChartsFeatureLayer(filePath)
but I get an exception: “The type initializer for ‘ThinkGeo.Core.GdalFeatureSource’ threw an exception”.
It’s a little strange, because looking at the InnerException’s InnerException property, it shows "Could not load file or assembly ‘ThinkGeo.Dependency.Gdal, Version=12.4.0.0, Culture=neutral, PublicKeyToken=0828af5241fb4207’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
but the main message shows "Could not load file or assembly ‘ThinkGeo.Dependency.Gdal, Version=13.0.0.0, Culture=neutral, PublicKeyToken=0828af5241fb4207’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)"
here’s a screenshot of the packages being used:
and the csproj lines:
Is there some kind of version mismatch? I don’t have v12.4 referenced anywhere so I’m not sure why it’s showing that exception.
Looks like I’m getting the same error trying to create a NativeImageRasterLayer like so:
var bmpLayer = new NativeImageRasterLayer(filePath, new RectangleShape(-180, 90, 180, -90))
{
LowerThreshold = GlobalObjects.Instance.OnyxMap.ZoomLevelSet.ZoomLevel13.Scale
};
bmpLayer.ImageSource.ProjectionConverter = new UnmanagedProjectionConverter(new Projection(4362).ProjString, new Projection(3857).ProjString);