Skip To Content

Deploying custom .NET and C++ tools

Sharing a custom geoprocessing function tool built in .NET or C++ is the same as sharing any other geoprocessing tool except that the function tool must be registered first. Of the following steps, the first one is the preparatory stage. Other steps elaborate the process.


Sharing a custom geoprocessing function tool built in .NET or C++ is only supported in ArcMap, it is not supported in ArcGIS Pro.

  1. Create a custom geoprocessing function tool.

    Creating a custom tool requires implementing IGPFunction2 and IGPFunctionFactory interfaces in a class library application. The output of the application is a dynamic link library (DLL). The Custom geoprocessing function tools topic in the .NET SDK help provides detailed information and examples.

    The custom function tool does not automatically become part of ArcGIS. To make that happen, complete a custom registration of the DLL.

    Once the DLL is registered, the tool can be used like any other geoprocessing tool. It can be shared as a geoprocessing package or published and consumed as a geoprocessing service.

    Use the ESRIRegAsm utility as described in steps 3 and 4 to register the DLL.

  2. Test the custom geoprocessing tool.

    To reiterate, the DLL of the custom tool must be registered on the machine that will be used to package or publish the tool.

    1. Make sure the tool runs successfully on any ArcGIS application. To test the tool, add it to a custom toolbox. Follow the desktop topic Adding tools to a toolbox if you need detailed steps.
    2. Document the tool. Refer to A quick tour of documenting tools and toolboxes for the steps. However, to document a DLL-based custom tool, you need to enable Item Description first. Consult Enable ArcMap to create documentation for custom geoprocessing tools for details.
    3. Run the tool in ArcMap to produce a result in the Results window. Examine the result and the output to verify this is a valid result. The result will be used to package or publish the tool.
  3. Share the tool as a geoprocessing package.
    1. Create a package from the result. Review A quick tour of creating a geoprocessing package for more information.
    2. As the tool's DLL is not bundled with the package, you must share the DLL separately along with instructions for how to register it.
    3. Register the DLL on the machine before using the package on that machine. To register the DLL for a 32-bit ArcGIS product (for example, ArcGIS Desktop) use the ESRIRegAsm utility located in the C:\Program Files (x86)\Common Files\ArcGIS\bin folder.
  4. Share the tool in a geoprocessing service.
    1. Make sure the DLL is registered on the machine hosting ArcGIS Server. The custom registration on the server machine must be done before any attempt to publish the tool from a client.
    2. Register the DLL for ArcGIS Server, a 64-bit product, using the ESRIRegAsm utility located in the C:\Program Files\Common Files\ArcGIS\bin folder.
    3. The result created in step 2c above can be published as a geoprocessing service from the machine where the result was created. It is important to remember that the DLL must also be registered on the machine from which you want to publish the result.
    4. To publish the tool as a service, refer to A quick tour of publishing a geoprocessing service for more information.