This is an archive related to a previous version of Esri Maps for SharePoint. If you need the current version go to

Visual Studio template

The Visual Studio template installed as part of the ArcGIS Extensibility SDK for Silverlight is designed to aid in the creation of tools (commands) and behaviors for use with the ArcGIS Viewer for Silverlight. Because Esri Maps for SharePoint and ArcGIS Viewer for Silverlight share a common extensibility framework, you can use the Visual Studio template to write add-ins for Esri Maps for SharePoint.

Installing the Visual Studio template

The Microsoft Visual Studio template is installed as part of the ArcGIS Extensibility SDK for Silverlight. The template enables you to easily create add-ins and layouts. While projects created using the template can be opened in Microsoft Expression Blend 5, the template will only appear in the project creation dialog box of Visual Studio. The template is supported on Microsoft Visual Studio 2010 and 2012. Earlier versions of Visual Studio and Expression Blend are not supported.


To use the template, you require the following:

Visual Studio template contents

Visual Studio solutions created from the Viewer template include three projects. In the list below, <Project Name> means the name of the project as specified on the New Project dialog box. The projects created as part of the template are as follows:

  • <Project Name>—This is a website project containing a fully functional Viewer application. This contains a copy of all the configuration files included with the Viewer. When you compile the solution, the output from the AddIns project and the layouts in the Layouts project are automatically copied to this website.
  • <Project Name>.AddIns—Contains a tool and behavior to get you started writing your own add-in. See Writing tools and Writing map behaviors for further details.
  • <Project Name>.Layouts—Contains a copy of the default layouts deployed with the Viewer. You can open these in Visual Studio or Expression Blend to modify their design or create new layouts.

Creating add-ins

To create an add-in using the template, complete the following steps. To upload an add-in, see Configuring add-ins.

  1. Start Microsoft Visual Studio 2010 or 2012.
  2. Click File > New > Project.

    The New Project dialog box appears.

  3. On the New Project dialog box, expand Visual C#, and then expand the Silverlight node.
  4. Click ESRI Viewer under the Silverlight node and select ArcGIS Viewer for Silverlight Project.
  5. Type a name for the project in the Name text box and click OK.
    Create a new ArcGIS Viewer for Silverlight project dialog box

    The add-in solution loads with three projects: one containing add-in code, one containing layouts, and one containing a Viewer website. Each project contains code and examples to help you get started creating custom tools, behaviors, and layouts.

Debugging an add-in

You can debug an add-in using Visual Studio and the Attach to Process functionality.

  1. Build your solution and verify that the build succeeds.
  2. Upload the resulting add-in .xap file to your SharePoint site (see Configuring add-ins).
  3. Add the tool to the desired toolbar and save.
  4. Add a breakpoint at the desired location in Visual Studio.
  5. In Visual Studio, click Debug > Attach to process.

    The Attach to Process dialog box appears.

    Attach to Process dialog box

  6. Click the Select button to specify the Attach to property. The Select Code Type dialog box appears.
    Select Code Type dialog box
  7. In the Select Code Type dialog box, check the box for Silverlight and click OK.
  8. On the main Attach to Process dialog box, select the browser's process (for example, iexplore.exe, if using Internet Explorer) that is of type Silverlight and click Attach.