ArcGIS Explorer SDK Feedback via the User Forum
Adding and Deploying Custom Tasks

Glossary Item Box

Deploying a task using an NMF file

If you wish distribute a custom task to other users, you have two main options.

For more information about exactly how the downloading process works, see the How tasks are downloaded topic.

Deploying a task using a task NMF

The steps below describe how you can deploy a task to your users by distributing an NMF file which contains information relating to one specific task. Users can then use this NMF file to deploy the custom task to their machine.

  1. First, build and test the custom task.
  2. Copy the resulting dll to a location which is accessible from the other computers on which you want to use the task. This may be on a web server for public access, or may be an intranet file share for use within a company. For example:
    \\MyServer\PublicShareName\SampleTask.dll
    or
    http://www.MyWebsite.com/Explorer/SampleTask.dll
  3. Create a task NMF file with the correct details of the task and its location.
    • If you have used the ArcGIS project templates, there should already be a suitable NMF file in your project, you will however need to edit the DownloadLocation tag as described below.
    • If you go not already have a task NMF file you can create one using the Task NMF file item template installed as part of the SDK. You will need to edit the contents of the new NMF to refer to the task you wish to deploy.
  4. Open your task NMF (you can open this file in Visual Studio, or any text or xml editor).
  5. Find the DownloadLocation element, and edit the path to reflect the new accessible location of the task assembly, for example:
    <DownloadLocation>file://MyServer\PublicShareName\SampleTask.dll</DownloadLocation>
    or
    <DownloadLocation>http://www.MyWebsite.com/Explorer/SampleTask.dll</DownloadLocation>
  6. Edit or update the values of the other elements in the task NMF (Assembly, Class and DisplayName), if required, to refer correctly to the task you wish to deploy.
  7. Save this task NMF File.
  8. Copy this task NMF file to your accessible location, or to another location which is publically accessible to your user, or send the task NMF to your user.

At this point, your user can use the Open Content or Manage Tasks dialog inside ArcGIS Explorer, in a similar way as you may have used on your developer machine, to deploy the task to their machine and add it to a map.

Deploying a task by as part of a map

The steps below describe how you can deploy a task to your users by including the task in a map, and then distributing the map or otherwise allowing users to access the map directly. When the user opens the map the task will automatically be downloaded to the machine, if it is not already present, and shown in the map.

The key here is that you include the task in a map by making sure that you use a tasl NMF file which has the correct download location specified. This ensures that the map you save and distribute or deploy also has that correct download location.

  1. First, follow the steps described above, so that your task is available at an accessible location, and you have a task NMF file which includes this location as the download location.
  2. Set up the map that you wish to distribute or deploy. Use the task NMF to add the task to this map; this ensures that your map includes the correct download location for your task.
  3. Save the map.
  4. Distribute the map to your users. Alternatively you can place the map on a server from where your users can open it directly; using this approach means that you can update the contents of the map, including the task version, without needing to redistribute the map.