Skip To Content ArcGIS for Developers Sign In Dashboard

Add ArcGIS Runtime SDK references

To work with ArcGIS Runtime SDK for .NET in your Visual Studio (Windows or Mac) project, you need to add the appropriate ArcGIS Runtime API NuGet package and also add any required XML namespace references in your XAML. This process is not unique to ArcGIS Runtime SDK for .NET, you may follow a similar workflow for other APIs you want to use in your project.

The following steps guide you through creating a new Visual Studio project for your WPF app. You will also learn how to add the proper references for working with ArcGIS Runtime SDK for .NET classes. You can follow these same basic steps for every ArcGIS Runtime SDK for .NET project you create.


ArcGIS Runtime SDK for .NET Visual Studio Extension provides a project template (for use in Visual Studio on Windows only) for creating your mapping app, called ArcGIS Runtime Application. See the Install the SDK topic for information about installing the ArcGIS Runtime SDK for .NET Visual Studio Extension.

Create a WPF app

Use Visual Studio to create a WPF app.

  1. Open a supported version of Microsoft Visual Studio.
  2. Choose File > New > Project (or click New Project on the Start page) to create a project.
  3. Click Windows > Classic Desktop > WPF Application in the New Project dialog box template list.

    If you create your app using the ArcGIS Runtime App template, you do not need to complete the rest of the steps described in this topic. Creating your project from the template adds the appropriate NuGet packages and references as well as a page with a map view containing a single base layer.

  4. Choose a folder location for your new project and give it a name.
  5. Click OK to create the project.

    Your solution opens in Visual Studio and contains a WPF window called MainWindow.xaml.

  6. Next, you'll add the appropriate ArcGIS Runtime SDK for .NET NuGet package for this platform.

Add ArcGIS Runtime SDK NuGet packages

ArcGIS Runtime SDK NuGet packages are hosted on If you have an internet connection, you can access these packages and add them to your Visual Studio (Windows or Mac) project without having to install anything locally. If you've installed the ArcGIS Runtime SDK for .NET Visual Studio Extension (Windows only), then you also have these packages available in a local NuGet package source (called Esri).

  1. Open the NuGet Package Manager (Project > Manage NuGet Packages, for example).
  2. Choose the Browse tab in the manager. Choose the Esri package source to add locally installed packages. Otherwise, choose the online package source. NuGet hosts around 100,000 packages, so you'll need to use the Search text box to locate the ArcGIS Runtime packages if using the online package source.
  3. To locate the ArcGIS Runtime packages, type ArcGIS Runtime in the Search text box. You will see several matches (for various versions and platforms).
    ArcGIS Runtime NuGet packages
  4. Select a version 100.9.0 package for your platform. Click Install to add the package to your project.
  5. Choose OK to proceed with the installation and then I Accept to accept the license agreement.

After adding the package, you'll be able to work with the components in ArcGIS Runtime for .NET API in your code.

Add XML namespace references

In addition to the project reference you made to the ArcGIS Runtime assembly, you must also add an XML namespace reference in your XAML page in order to add the MapView control to your page.

  1. Open the MainWindow.xaml file in the Visual Studio designer.
  2. Go to the XAML view of the designer and add the following XML namespace reference to the WindowContentPage XAML element. Visual Studio offers Intellisense to help complete the URL portion of the statement.
  3. All XAML elements from the ArcGIS Runtime API are available in the namespace. They can now be referenced in your page using the esri prefix.
  4. You can now use the XML prefix you've defined to work with ArcGIS Runtime SDK in your XAML. The following code sample defines a new MapView control and Map containing a single ArcGISTiledLayer basemap layer.
                <esri:Basemap Name="Basemap">
                    <esri:ArcGISTiledLayer Name="World Topographic"

    You can display a map in your app by ...

    • Defining it entirely with XAML
    • Use data binding to associate the MapView control defined in XAML to a Map in another class (a ViewModel using the MVVM pattern, for example)
    • Define the MapView in your XAML and assign a map in your code behind, as shown in the following example.
    // create a new Map with a streets basemap
    var map = new Map(Basemap.CreateStreets());
    // assign the map to MyMapView (MapView control)
    MyMapView.Map = map;

The process described in this topic is generally the first thing you'll do for each ArcGIS Runtime SDK for .NET project you create from a standard Visual Studio template. The details for adding these references differ slightly between SDK platforms.

Related topics