Hi -
Is anyone able to get the sample ArcGISRuntime.WPF.Viewer.NetCore.csproj for 100.10 to compile with .net 5.0?
With <TargetFramework>net5.0-windows</TargetFramework>, I get this error:
Error The 'Esri.ArcGISRuntime.Hydrography' nuget package cannot be used to target 'net5.0-windows'. Target 'net5.0-windows10.0.18362.0' or higher instead.
So I updated to <TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>, but now I get this:
Error XDG0008 The name "Map" does not exist in the namespace "http://schemas.esri.com/arcgis/runtime/2013". ArcGISRuntime.WPF.Viewer.NetCore D:\repos\esri\arcgis-runtime-samples-dotnet\src\WPF\ArcGISRuntime.WPF.Viewer\Samples\Layers\ArcGISMapImageLayerUrl\ArcGISMapImageLayerUrl.xaml
Thanks, Kirk
Solved! Go to Solution.
FYI made a PR to address these remaining issues, so you can pull that until it's been merged:
https://github.com/Esri/arcgis-runtime-samples-dotnet/pull/851
Hi Kirk,
What happens when you target `net5.0-windows10.0.18362.0`?
Hi Michael -
Sorry, shoulda mentioned I get the same thing.
I'm running Microsoft Windows [Version 10.0.19042.746], and on this page it says
So I figured I'd use net5.0-windows10.0.19041.0.
Same results with either one though.
Thanks, Kirk
This hydrography issue is a restore error. Try deleting the \obj\ folder and rebuild and this error will go away.
As you then found you will however after that see a few XAML compilation errors. In the .NET 5.0 build there isn't support for creating some of the objects in XAML with the default prefix.
For example you will want to change esri:Map by registering the namespace using:
xmlns:mapping="clr-namespace:Esri.ArcGISRuntime.Mapping;assembly=Esri.ArcGISRuntime"
and then change it to <mapping:Map />
This change has happened, because the Esri.ArcGISRuntime package no longer takes a dependency on WPF, and without that, we can't auto-register those namespaces for use by WPF. This is a current limitation in WPF, but hope to get this addressed with the PR to WPF I submitted here (feel free to upvote it help get support for it): https://github.com/dotnet/wpf/pull/3066
FYI made a PR to address these remaining issues, so you can pull that until it's been merged:
https://github.com/Esri/arcgis-runtime-samples-dotnet/pull/851