Apps built with ArcGIS Runtime SDK for .NET require an ArcGIS Runtime deployment. The ArcGIS Runtime deployment contains the minimum set of ArcGIS Runtime components required to support the functionality in your app, from rendering beautiful maps to performing complex GIS analysis. Likewise, excluding unneeded components produces focused apps with a smaller footprint, containing bits only for the capabilities you need.
Your ArcGIS Runtime SDK for .NET app requires the Visual Studio VCLibs (C++ redistributable) to work. Microsoft provides a download for the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019. This dependency won't be obvious as you develop your app, since it is included with Visual Studio. It is critical, however, that you make this package available for users installing your app.
Define ArcGIS Runtime components to deploy
An ArcGIS Runtime deployment is created for you automatically when you build your project.
If your project uses Local Server, an XML-based manifest file (ArcGISLocalServer.AGSDeployment) is used to manually configure Local Server components needed for your deployment. See the Create a Local Server deployment topic more information about deploying Local Server for your WPF app.
You will need an ArcGIS Runtime deployment for every target platform for your app. The ArcGIS Runtime NuGet packages will automatically detect the build target for the project and build an ArcGIS Runtime with the appropriate architecture.
Runtime DLLs and resources
The ArcGIS Runtime NuGet package(s) you add to your project will deploy the necessary runtime components according to your build configuration. The location of these files in the output will vary according to the current build configuration and platform. For example, if you're building a .NET Framework WPF project for Any CPU, ArcGIS Runtime core DLLs will be created in directories called client32 and client64. These directories appear under a folder called ArcGISRuntime100.x in the project output.
The same Any CPU build for a .NET Core WPF project will output these files slightly differently. ArcGIS Runtime resources will still appear under a folder called ArcGISRuntime100.x, but the ArcGIS Runtime native DLLs will be in a runtimes subfolder as shown in the following example. For all builds, the managed ArcGIS Runtime assemblies appear in the same output folder as the app executable.
If you build your app specifically for x86 or x64, the native DLLs will be placed in the same folder as your app's executable rather than in a separate folder. You will still have an ArcGISRuntime100.x folder to contain required resources.
Deploying specialized symbols
You may need to deploy specialized symbols, such as military symbol dictionaries, for use with your ArcGIS Runtime SDK app. In ArcGIS Runtime SDK for .NET versions prior to 100.0, these symbols were included in the SDK install and could simply be copied to a deployment folder for your app. To reduce the size of the setup (especially with the increased number of supported platforms), these symbols are not included in the ArcGIS Runtime SDK for .NET NuGet packages.
You have a couple of options for including these symbols in your deployment.
- The ArcGIS for Defense group hosts the following ArcGIS Online items that contain .stylx files with military symbols. Use the support matrix to find and download the supported stylx file for your version of ArcGIS Runtime SDK. Once downloaded, you can include the files in your app deployment. Logic in your app, of course, would be required to locate and use the included files as needed.
- Add logic to your app that prepares the app for offline use by downloading the files and storing them locally. You can access these resources when your user is online either by programmatically downloading them (using System.Net.Http.HttpClient, for example) or accessing them as portal items using the ArcGIS Runtime API, reading their contents, and storing them locally. The following example shows how to access some of the hosted military symbol items using ArcGIS Runtime code.
// Get the ArcGIS Online portal (default if no URI is provided) ArcGISPortal agol = await ArcGISPortal.CreateAsync(); // Get the military symbol items (use their unique item IDs) PortalItem itemMil2525c = await PortalItem.CreateAsync(agol, "ef95f95470db437f80ea764a9d05203b"); PortalItem itemMilStd2525d = await PortalItem.CreateAsync(agol, "c78b149a1d52414682c86a5feeb13d30"); // Read the data from the items var dataMil2525c = await itemMil2525c.GetDataAsync(); var dataMilStd2525d = await itemMilStd2525d.GetDataAsync(); // ... Code here to read the data and write it to a local file ...