Building and verifying add-in projects


Summary
This topic describes how add-in projects created by Visual Studio tools for ArcGIS Explorer are verified and automatically set up to use on your development machine when you build the project.

In this topic


About building and verifying add-in projects

When you create an add-in project using the ArcGIS Explorer project templates, actions are performed as follows when the project is built:
  1. The normal Visual Studio compilation process happens.
  2. An add-in file (.eaz) is created.
  3. The add-in file contents are verified.
  4. The add-in file is deployed ready for testing on the development machine.
You can view a summary of the actions performed in Visual Studio's Output window. Additional information on each step is discussed in the following sections.
The add-in file creation, verification, and test deployment are performed using MSBuild tasks, which are part of Visual Studio 2008 and Visual Studio 2010. For more information about MSBuild tasks, see the Microsoft Developer Network (MSDN) Web site topic, MSBuild Task Reference.
These actions are only taken for projects created with the ArcGIS Explorer project templates. For more information, see How to create add-in projects.

Add-in file creation

When the project is built, an add-in file (.eaz) is created. The following items are included in the .eaz file:
  • Addins.xml file—Defines the customizations to be added to Explorer.
  • Target .dll file—Compiled source code of the project.
  • Any project dependencies that have the CopyLocal property set to true. This ensures dependencies can be loaded when the add-in is run.
  • Images folder and any images contained in the folder. Set the Build Action property for the image files to Content. This is set by default when you add the image using the project or item wizards.
  • Any other files in the solution with a Build Action property value of Content.
The ArcGIS Explorer assemblies, ESRI.ArcGISExplorer.dll and ESRI.ArcGISExplorer.Application.dll, are not included in the add-in file, regardless of the CopyLocal property setting. The correct setting for ArcGIS Explorer assemblies is CopyLocal = false.

Add-in verification

Visual Studio tools for ArcGIS Explorer does verification at compile time to check that the add-in is created and deployed correctly. These checks are performed after the normal compilation steps.
The validation process checks several items, including the following:
  • Incorrect attributes or elements in the .xml file
  • Missing required attributes
  • Duplicated ID attributes (IDs must be unique in each add-in)
  • Image files specified in the smallImage or largeImage attributes that are not in the .eaz file
  • Class names specified in the AddIns.xml file that cannot be found as a public class in the assembly
  • Missing add-in class public default constructors
If problems are encountered, they are reported as build errors or warnings in the Error List window in Visual Studio. Double-click the error line to go to the .xml element. See the following screen shot:

Test deployment

After the add-in file is verified, it is automatically deployed ready for testing on the developer machine. For more information, see Testing add-ins on a developer machine.

Add-in creation, verification, and deployment

The add-in file creation, verification, and test deployment steps are summarized in the Output window in Visual Studio when the project is built. See the following screen shot:
  
 
If there are any errors during the deployment process, refer to the first case in the build's Error and Output windows.
For more information about the add-in cache, see How ArcGIS Explorer finds and loads add-ins.