BruTile / BruTile

BruTile is a .NET library to access tile services like those of OpenStreetMap, MapBox or GeodanMaps.
Apache License 2.0
331 stars 119 forks source link

System.BadImageFormatException: Expected reference type but got type kind 17 #240

Open janusw opened 5 months ago

janusw commented 5 months ago

When trying to update from BruTile 5.0.6 to 6.0.0-beta.1, I'm seeing strange exceptions on lines like this:

ILayer l = new TileLayer(new HttpTileSource(new GlobalSphericalMercator(minZoomLevel: 0, maxZoomLevel: 18, name: name),
                         "https://sg.geodatenzentrum.de/wmts_topplus_open/tile/1.0.0/web_scale_grau/default/WEBMERCATOR/{z}/{y}/{x}.png",
                         attribution: BKGAttribution, persistentCache: fc, configureHttpRequestMessage: configureHttpRequestMessage)) { Name = name };

The exception is as mentioned in the title:

System.BadImageFormatException: Expected reference type but got type kind 17

Note that Mapsui is used in version 4.1.6. Can this be an incompatibility between the BruTile and Mapsui versions? Is it worth to try Mapsui 5.0.0-beta.1?

pauldendulk commented 5 months ago

BruTile 6.0.0-beta.1 has not been integrated in any Mapsui version yet. There are breaking changes so this won't work.