Select to view content in your preferred language

Exception in .NET 8 WPF app when loading Runtime v200.2.0

2034
4
Jump to solution
11-15-2023 08:35 AM
Labels (2)
SokoFromNZ
Frequent Contributor

Hi,

I've upgraded my working .NET 7 WPF app with the Esri.ArcGISRuntime.WPF nuget v200.2.0 to the new .NET 8.

Now, while starting the app I get an Exception in my App constructor in the first line I'm accessing Arcis like this:

 

    public App()
    {
        ArcGISRuntimeEnvironment.SetLicense("MyLicense");
        ArcGISRuntimeEnvironment.ApiKey = "MyKey";
        ...
    }

 

Line 3 throws the exeption:

System.InvalidOperationException: 'Could not load ArcGIS Runtime (RuntimeCoreNet200_2.dll) or one of its dependencies. Ensure "Microsoft Visual C++ 2015-2022 Redistributable" is installed.'

C++ Redist is installed in x86 and x64. I even tried to reinstall it. No help. I'm running it directly via attached Debugger out of Visual Studio 2022 (v17.8.0) on a Windows 11 Pro 23H2 machine...

Anyhow: When I go back to .NET 7 everything works fine.

Do I have to wait for an update of your Runtime to use .NET 8 or is there any workaround to use the current Runtime with .NET 8?

Thanks

Soko

PS: Updating my .NET7 MAUI app (Android only) to .NET8 MAUI seems to work. I don't get an exception when setting the license and the MapViews seem to work properly as well at first glance.

0 Kudos
2 Solutions

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

Try adding <UseRidGraph>true</UseRidGraph> to a property group. There's a breaking change in .NET 8 that affects how native assemblies gets deployed (This workaround won't be needed for 200.3)

View solution in original post

0 Kudos
dotMorten_esri
Esri Notable Contributor

Not sure if you missed it or not, but 200.3 went live last week, and you no longer need the UseCidGraph workaround (unless you use WinUI, but that's on WinUI team to fix - slated for their v1.5 release).

View solution in original post

0 Kudos
4 Replies
dotMorten_esri
Esri Notable Contributor

Try adding <UseRidGraph>true</UseRidGraph> to a property group. There's a breaking change in .NET 8 that affects how native assemblies gets deployed (This workaround won't be needed for 200.3)

0 Kudos
SokoFromNZ
Frequent Contributor

Thanks for the speedy reply. It works, awesome!

Do you have an ETA for v200.3? Just a rough one like: one week, one month, one year...

0 Kudos
dotMorten_esri
Esri Notable Contributor

Not sure if you missed it or not, but 200.3 went live last week, and you no longer need the UseCidGraph workaround (unless you use WinUI, but that's on WinUI team to fix - slated for their v1.5 release).

0 Kudos
dotMorten_esri
Esri Notable Contributor

December