Skip To Content

Add ArcGIS Runtime SDK references

In this topic

In order to work with ArcGIS Runtime SDK for .NET using Visual Studio, you will need to reference the assembly in your project and also add any required XML namespace references in your XAML. This process is not unique to ArcGIS Runtime SDK for .NET, you will follow it for any additional assembly you want to use in your project.

The following steps guide you through creating a new Visual Studio project for your Windows Store application. You will also learn how to add the proper project and namespace 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 provides a project template for creating your mapping app, called ArcGIS Runtime 10.2.7 for .NET App. Creating your project from the template will add the appropriate references and a page with a map view containing a single base layer. In this tutorial, you'll build your app from a blank template.

Create a Windows Store app

You'll use Visual Studio to create a Windows Store 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 Store Apps > Windows Apps > Blank App (Windows) in the New Project dialog box (you can create your project in either C# or VB .NET).

    Visual Studio 2015 organizes project types slightly differently. You'll find Store projects under Windows 8 > Windows


    If you decide to use the ArcGIS Runtime template, you will not need to complete the steps described in this topic.

  4. Choose a folder location for your new project and give it a name.

    Visual Studio New Project dialog box

  5. Click OK to create the project.

    Your project opens in Visual Studio and contains a single page called MainPage.xaml.

  6. Next, you'll add a reference to the ArcGIS Runtime SDK for .NET API assembly.

Add a project reference to ArcGIS Runtime

When you create a new project from one of the standard templates, Visual Studio does not know about the ArcGIS Runtime. To use the ArcGIS Runtime classes, you must add a reference to the ArcGIS Runtime assembly in your project.

  1. Right-click the References node under your project listing in the Visual Studio Solution Explorer window, and click Add Reference in the context menu.
  2. Check the listing for the ArcGIS Runtime for Windows Store apps assembly under Windows 8.1 > Extensions.

    Visual Studio Reference Manager dialog box

  3. Click OK to add the reference to ArcGIS Runtime for .NET.

    Visual Studio project references

  4. Note:

    In order for your app to build, you need to specify a build target for the project. The default value of Any CPU will not work and is why the new references are shown with a yellow warning icon.

    You will now specify a build platform for the app.

  5. Choose BUILD > Configuration Manager.
  6. Choose x86 in the Active solution platform drop-down menu. This will target a 32-bit platform for the app.

  7. Click Close in the Configuration Manager dialog box.

    The warning icons no longer appear in the Solution Explorer window for these references.

Add XML namespace references

In addition to the project reference you made to the ArcGIS Runtime assembly, you must also add one or several XML namespace references in your XAML page (MainPage.xaml, for example).

  1. Open the MainPage.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 Page XAML element. Visual Studio offers Intellisense to help complete the URL portion of the statement.
  3. The Esri.ArcGISRuntime.Controls namespace contains the MapView control and Map class that you will need if you want to place a map on your page. Esri.ArcGISRuntime.Layers contains, as you might expect, a variety of Layer classes that can be added to the Map. You can now use the prefixes for the references (esri and layers) to add objects from these namespaces. Depending on the objects you need to work with in your XAML, you may need to make additional namespace references. When making a reference, Visual Studio Intellisense helps you by displaying a list of available namespaces, as shown below.
    Visual Studio Intellisense displays available namespaces

    For readability, define your XML namespaces with prefixes that allow you to easily identify to which namespace it refers. For example, use sym to refer to the Esri.ArcGISRuntime.Symbology namespace. Being consistent in your naming also allows you to move XAML between projects without having to make edits.

  4. You can now use the XML prefixes you've defined to work with ArcGIS Runtime SDK objects in your XAML. The following code sample defines a new MapView control and Map containing a single basemap layer.
    <esri:MapView x:Name="MyMapView">
       <esri:Map x:Name="MyMap">
          <layers:ArcGISTiledMapServiceLayer ID="BaseMap" 

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