Post on 14-Aug-2020
transcript
Mike Branscomb
Rex Hansen
ArcGIS Runtime SDK for .NET:
Building Desktop and Mobile Apps
Agenda
• Overview
• ArcGIS Runtime Architecture
• Getting Started
• What’s New (2019)
• Resources
• Troubleshooting
ArcGIS Runtime SDK for .NET
Overview
Overview
• Develop native mapping and location analysis apps with .NET
• 2D and 3D Visualization
• Ready to use maps and data
• Search and geocode
• Directions and routing
• Demographics data
• Spatial analysis
• Hosted data
• Offline workflows
Apps
Desktop
APIs
Online
Enterprise
Overview
• APIs
- Windows Presentation Foundation (WPF)
- .NET Framework
- .NET Core
- Universal Windows Platform (UWP)
- Xamarin.Android
- Xamarin.iOS
- Xamarin.Forms (Android, iOS, and UWP)
• SDK
- Templates, Toolkit controls, Doc, Sample code, Tutorials, Open Source Apps
• Cross-platform
- Share your .NET C# business logic code across Android, iOS, and Windows
ArcGIS Runtime SDK for .NET
ArcGIS Runtime Architecture
Overview – ArcGIS Runtime SDK for .NETAn Architecture Designed to Maximize Performance and Reuse
C++ runtime core
x86 x64 ARM64DirectX
OpenGL
OpenGL ES
WPFUWPiOSAndroid
Xamarin.Forms
WinAndroid iOS UWP
Overview – ArcGIS RuntimeAn Architecture Designed to Maximize Performance and Reuse
C++ runtime core
WinLinux macOSAndroid iOS UWP
x86 x64 ARM64
DirectX
OpenGL
OpenGL ES
ArcGIS Runtime SDK for .NET
Getting Started
Installing ArcGIS Runtime SDK for .NET
• Visual Studio extension (VSIX)
- Install directly in Visual Studio
- Project templates for each supported platform
- Download from developers.arcgis.com/downloads
- Project templates for each supported platform
- Local NuGet packages for offline development
• NuGet packages on NuGet.org
- WPF
- UWP
- Xamarin.Android
- Xamarin.iOS
- Xamarin.Forms (Android, iOS, UWP)
- Toolkit
- AR Toolkit
DemoGetting Started
Prerequisites for development
• System requirements depend on the apps you plan to build
- Building Xamarin.iOS projects requires an associated Mac computer as a build host
ArcGIS Runtime SDK for .NET
What’s New (2019)
WPF & .NET Core 3.1
• ArcGIS Runtime 100.7 supports .NET Core 3.1 with *WPF* for Windows Desktop apps
• Removes dependency on system-wide .NET Framework
- Self-contained app folders
- Deploys .NET Core to your app publish folder
- Benefit from .NET Core performance improvements
• Single File executables
• Packages your app, any native libraries (like ArcGIS Runtime) and .NET Core
DemoSupport for .NET Core with WPF
.NET
Core
Toolkit 100.7
• Toolkit 100.7 – *Released February 2020*
• Support for .NET Core with WPF
• New Bookmarks control
• Complete rewrite of Legend control and TableOfContents controls
- TableOfContents is currently in Preview
• Dark Mode support for iOS
• New DocFX-based website with api reference and concept documentation
- Over time this will migrate to the ArcGIS Developers site
What’s New: 100.5
• Serialize credentials for persisting between sessions
- As the developer you must store securely on the device
• Windows on ARM64 support for UWP
• Improved template discoverability in Visual Studio 2019 for Windows
• Mouse / trackpad navigation improvements for WPF/UWP
• WPF honors software rendering if set at a system-wide or app-wide level
- e.g. RenderOptions.ProcessRenderMode = System.Windows.Interop.RenderMode.SoftwareOnly;
• WPF increased default number of concurrent network requests
- Significantly improved tile performance
- Override via ServicePointManager
- Default is 6
What’s New: 100.7
• *Preview* of support for *WPF* for .NET Core 3.0
- Included in 100.6 WPF NuGet package
- Build warning reminder for Preview
• Performance benchmarking using https://github.com/dotnet/BenchmarkDotNet
• New API method AddRange() on RuntimeCollection
- Graphics, GraphicsOverlays, Layers, UniqueValues, ClassBreaks
- Batches internal ArcGIS Runtime logic for error handling and collection changed events
- 10-15% reduced execution time when adding large numbers of Graphics to a GraphicsOverlay
- 85-90% reduced temporary allocations
- Reduces the memory consumed and reduces the workload for garbage collection
• Graphic performance improvements
- Adding/removing a Graphic from a GraphicOverlay allocates ~18% less memory
- Retrieving selected Graphics allocates ~50% less memory
- Identifying on a GraphicsOverlay allocates ~70% less memory
Fully supported at v100.7!
What’s New: 100.7
• Optimized common API workflows
- Adding new features to a feature table is faster and allocates less memory
- Creating new graphics and setting their geometries and attributes is faster and allocates less
memory
- Improved SpatialReference handling when working with multiple geometries
• WPF SketchEditor Freehand DrawingMode has a higher density of vertices, resulting in
significantly smoother lines
• Certificate Credential workflows now supported on UWP
ArcGIS Runtime SDK for .NET
Troubleshooting Tips
Troubleshooting – ArcGIS Runtime Exceptions
• Check ArcGISRuntimeException errors
• Platform error codes in the Guide doc
• https://developers.arcgis.com/net/latest/wpf/guide/platform-error-codes.htm
Troubleshooting – Logging
• ArcGIS Runtime uses System.Diagnostics.Trace to provide errors and information
- ArcGISRuntime initialization info
- Rendering mode (if using Windows software rendering)
- DirectX rendering errors
• If debugging `DefaultTraceListener` will write to Visual Studio Output window
• Add additional SystemDiagnostics.TraceListener(s)
- EventLog TraceListener
- TextWriter TraceListener
Troubleshooting – Debugging Crashes
• ArcGIS Runtime debug symbols (.pdb files) available on Esri symbol server
- WPF & UWP
• Add the esri symbol server:
- In Visual Studio: Navigate to Tools > Options > Debugging > Symbols
- Add a `New Location` & specify the esri symbol server
- URL: http://downloads2.esri.com/support/symbols
- Ensure the checkbox is checked next to the new URL in the list of `Symbol file (.pdb) locations`
• Enable native code debugging:
- In Visual Studio: Navigate to Project > Properties > Debug
- Under the section `Debugger engines` check the box to `Enable native code debugging`
• When debugging the app or a crash dump file (.dmp) locate the following modules then
right click > Choose `Load Module`:
- RuntimeCoreNet.dll
- runtimecore.dll
ArcGIS Runtime SDK for .NET
Summary
Summary
• ArcGIS for Developers site is your development dashboard
• Guide doc & API ref doc
• Sample code
• Open Source Apps on Github
• Toolkit
• .NET Team Demos repo
- https://github.com/Esri/arcgis-runtime-demos-dotnet
• Connect with the community on Geonet
Print Your Certificate of Attendance
Print Stations Located in 150 Concourse Lobby
Tuesday12:30 pm – 6:30 pm
Expo
Hall B
5:15 pm – 6:30 pm
Expo Social
Hall B
Wednesday10:45 am – 5:15 pm
Expo
Hall B
6:30 pm – 9:30 pm
Networking Reception
Smithsonian National Museum
of Natural History
Download the Esri
Events app and find
your event
Select the session
you attended
Scroll down to
“Survey”
Log in to access the
survey
Complete the survey
and select “Submit”
Please Share Your Feedback in the App