|     Documentation    |     Premium Support

MrSID does not work in a published project

This sample program works when debugging, but when I publish it and start the .exe from the bin\Release\netcoreapp3.1\publish directory, I get an error message “World.sid’ not recognized as a supported file format.”

    private void MapView_Loaded(object sender, RoutedEventArgs e)
        mapView.MapUnit = GeographyUnit.DecimalDegree;
        var layer = new MrSidRasterLayer(@".....\World.sid");
        var layersOverlay = new LayerOverlay();
        mapView.CurrentExtent = new RectangleShape(-180, 90, 180, -90);

I notice that the gdal_MrSID.dll file is normally in the gdalplugins subdirectory, but that the publishing process puts it directly into the publish directory. This does not happen with the gdaldata subdirectory.

hi Clemens,

It does seem the public process in Visual Studio cannot handle GDAL dependencies correctly. Thanks for the reporting and I’ve added it to the issue tracker. I suppose you can work it aournd by creating a different way to publish? Let us know if you see any other issues.