I am upgrading an old ESRI .NET application from 10.2.7 to 100.10. I have 160 errors that popped up when I removed my old 10.2.7 references in Visual Studio 2019 and added the 100.10 reference from Esri.ArcGISRuntime.100.10.0\lib\net461\Esri.ArcGISRuntime.dll.
An example: There used to be a GraphicsLayer class in the Esri.ArcGISRuntime.Layers namespace in 10.2.7. Both of those have disappeared in 100.10. How best to track these down or figure out what they have become? The API reference for 100.10 has no mention of a GraphicsLayer, so I guess it has been renamed to something else now?
Can someone suggest the best way to figure out where the old namespaces and classes now hide in the newest code, or what they have been renamed to? Maybe a reference like that has already been compiled?
Thanks so much in advance,
A previous version of our developer guide has a section dedicated to the migration from 10.2.x to 100.x versions of Runtime. The last version of the guide with that section was released with 100.9. You can access the developer guide download through the dashboard. I can't link to the 100.9 guide download directly, so be sure to scroll down to select that version. https://developers.arcgis.com/downloads/#net
That document covers various conceptual differences, and also provides a table that maps the old namespaces and API names to the new names.
For graphics specifically, that functionality has moved to GraphicsOverlay. GrahicsOverlays are added to MapView and SceneView, rather than Map and Scenes; the guide section on migration goes into more detail about those concepts.
One more thing: the preferred approach for referencing the Runtime API is via the nuget package, ideally using the PackageReference format (rather than the old packages.config format). I understand that the nuget package includes some compatibility checks as well as other aspects of build configuration that may be missed with a manual direct reference to the contained DLL. This is a change from the documented process for referencing the ArcGIS Runtime API since 10.2.7.
Good luck with the migration and please do let us know if you have any more questions.
Thanks much for your reply. I have just downloaded the 100.9 guide and will check out the migration stuff and look for info about referencing the nuget package. I appreciate the quick response. Will let you know how it goes.
Just to comment on this:
> One more thing: the preferred approach for referencing the Runtime API is via the nuget package
The _only_ way for it to work is by using nuget references. Referencing just the assembly won't work, since it would cause a bunch of required files to not be deployed which the NuGet package will do for you. Your app will probably compile, but it'll crash when you run. You should reference the Esri.ArcGISRuntime.WPF package if you're building a WPF app (it'll in turn pull in Esri.ArcGISRuntime dependency package as well). If you only reference Esri.ArcGISRuntime you won't get the WPF extension that contains the MapView control.
Thanks for clarifying this. I went ahead and removed my old reference to the assembly directly, and instead installed the WPF and Runtime nuget packages. Working through the upgrade changes now, using the 100.9 guide PDF for reference. Appreciate all the help, guys!