Select to view content in your preferred language

Issues using ExportTileCacheTask from Esri.ArcGISRuntime with .NET 8 on Mac

101
3
Jump to solution
a week ago
Labels (1)
MickAtWeMakeApps
New Contributor

Hello, I've actually inherited a .NET project from another vendor that is using the Esri.ArcGISTRuntime SDK to download tiles from an Esri map server.

(The use case is a bit complicated, it's for an app used by people to go to national parks in Australia where there's no internet. This little .NET app runs on a server and creates 'packs' of all the things for one of these national parks, including a big cache of map tiles, which are rendered in the native iOS and Android app using Esri's native SDKs)

Anyway, the .NET code is failing when simply trying to prepare the task:

await ExportTileCacheTask.CreateAsync(serviceUri);

The error that comes out says:


System.PlatformNotSupportedException: Operation is not supported on this platform.
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.InitializeRuntimeCore()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.Initialize()
at Esri.ArcGISRuntime.ArcGISRuntimeEnvironment.OnBeforeFirstUseOfGeneratedWrapper()
at RuntimeCoreNet.GeneratedWrappers.CoreWrapperBase..cctor()


I'm attempting to run this code on a Mac (and was hoping to deploy to Linux). Is there some other nuget I can install to get this to work? Note that this is the only thing I'm trying to do with the Esri nuget - there's no UI in the specific little server task I'm dealing with here.

Thanks!

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

You must target net8.0-maccatalyst for this to work. Vanilla net8.0 is not supported on mac.

View solution in original post

3 Replies
dotMorten_esri
Esri Notable Contributor

You must target net8.0-maccatalyst for this to work. Vanilla net8.0 is not supported on mac.

MickAtWeMakeApps
New Contributor

Thanks, I eventually came to the same realisation. Happily I was able to achieve the same outcome by going direct to the the ArcGIS REST API, using the /exportTiles endpoint.

0 Kudos
dotMorten_esri
Esri Notable Contributor

We could probably improve that error message a bit to make it more clear. I'll put that in the backlog.

0 Kudos