Language: C#
Subject: Framework
Contributor: ArcGIS Pro SDK Team <arcgisprosdk@esri.com>
Organization: Esri, https://www.esri.com
Date: 11/05/2026
ArcGIS Pro: 3.8
IDE: Visual Studio 2026, Visual Studio Code
This ProGuide explains how to configure and use Visual Studio with GitHub Copilot to develop ArcGIS Pro addins. This guide has two main sections:
- Setting up a GitHub Repository and GitHub Copilot for ArcGIS Pro Add-in Development
The steps outlined in this section are prerequisites to using GitHub Copilot and only need to be performed once before developing Add-ins or other ArcGIS Pro extensions. - Using GitHub Copilot to develop an ArcGIS Pro Add-in
The steps outlined in this section show a sample addin development workflow using GitHub Copilot.
A finished sample for this ProGuide is available here: MyCopilotAddin
Prerequisites
To use GitHub Copilot within Visual Studio, you need to meet the following requirements:
- A GitHub account: You need a GitHub account to use GitHub Copilot. If you don't have one, you can sign up for free at GitHub.
- Sign up for a GitHub Copilot plan or subscription: GitHub Copilot is a paid service, but it offers a free trial period.
- In order to test this Add-in, a sample dataset has been provided that can be downloaded from: https://github.com/Esri/arcgis-pro-sdk-community-samples/releases specifically the release asset called: "CommunitySampleData-3D-11-21-2025.zip" which contains an ArcGIS Pro project called 'Elevation\HawaiiElevation.aprx'. This project contains all feature layers and test data needed to test the Add-in created in this ProGuide.
Setting up a GitHub Repository and GitHub Copilot for ArcGIS Pro Add-in Development
Step 1 Visual Studio GitHub Copilot Sign-in
- In Visual Studio, sign in using your GitHub account with an active Copilot subscription.

Step 2 Create a new folder and open the folder in Visual Studio
- Create a new folder and open the folder in Visual Studio
- Or: On GitHub, create a new repository to store your ArcGIS Pro Add-in project. The repository can be made private to restrict access to the code.
- And make sure to initialize the repository with the 'Visual Studio' .gitignore file to exclude files that should not be included in the repository.

Step 3 Set up the editor and Copilot environment.
The editor and Copilot environment are available in this repo: https://github.com/Esri/arcgis-pro-sdk-community-samples or https://github.com/Esri/arcgis-pro-sdk-copilot
- Clone or download the https://github.com/esri/arcgis-pro-sdk-community-samples repo.
- Copy the .editorconfig file and the .github folder from that repo into the root folder of your folder (workspace).
Step 4 Tuning Copilot with MCP Server (optional after VS 2026 18.2.0 or later) The GitHub MCP (Model Context Protocol) server enables seamless integration of AI capabilities with GitHub. Connecting your development machine to a GitHub MCP server enables Copilot to access repositories on GitHub, such as the Esri/arcgis-pro-sdk-community-samples repository.
If GitHub MCP has already been set up on your machine, you can skip this step. Otherwise, perform the following setup instructions for the GitHub MCP server in GitHub Copilot for Visual Studio. It is best to start out with the GitHub MCP remote server, which is hosted by GitHub and requires no local setup:
- Requires Visual Studio 2026 version 18.10.2 or later.
- The remote GitHub MCP server is hosted by GitHub and provides automatic updates with no local setup required.
- At the time of publication it is not clear if the MCP Server is still required in Visual Studio 2026. In Visual Studio Code the MCP Server functionality is now supported out-of-box.
- Create a new file with the file name
.mcp.jsonin your solution or %USERPROFILE% directory. - Add this configuration to the newly create json file:
{
"servers": {
"github": {
"url": "https://api.githubcopilot.com/mcp/"
}
}
}
- In Visual Studio open the '.mcp.json' file you created in step 1. You should now (if enabled) see the Visual Studio CodeLens control display the configuration options for the MCP server as shown here:






Using GitHub Copilot to develop an ArcGIS Pro Add-in
To demonstrate in Visual Studio 2026 with GitHub Copilot how to develop an ArcGIS Pro add-in, we create a sample add-in that uses a DockPane to guide the ArcGIS Pro user through a GIS workflow. A dockpane allows the user to select a 2D parcel lot feature on a 3D map, displays the selected parcel's ID, shows a drop-down option for selecting a multi-patch polygon resolution (0 = rough through 100 = fine in 10 increments), and at the bottom contains a button to create a 3D representation of the selected parcel lot geometry. When clicked, the button creates a 3D feature of the selected parcel as a multi-patch feature in the "Lot MultiPatch" layer. To debug and run the add-in, the 'Elevation\HawaiiElevation.aprx' project can be downloaded (see the Prerequisites section above for details).
Note: When using GitHub Copilot, any suggestions provided by Copilot depend on a variety of factors and cannot be reliably duplicated. AI models are continuously trained on large datasets and generate responses based on patterns learned from that data. User interactions, context, and timing can all influence the output. Therefore, while this guide provides a structured approach to using GitHub Copilot for ArcGIS Pro add-in development, the specific suggestions and code implementation you receive may vary from those shown here.
Step 1 Create a new MyCopilotAddin project with all the needed UI elements
- In Visual Studio 2026, create a new ArcGIS Pro add-in project called 'MyCopilotAddin' with some initial UI modifications to the Pro ribbon. Use the following prompt in the Chat window:
Create a new ArcGIS Pro Module Add-in project called MyCopilotAddin. Change MyCopilotAddin to add a new ArcGIS Pro tab on the ArcGIS Pro ribbon called '3D Lots'. This tab contains a group called 'Lots creation'. The 'Lots creation' group contains an ArcGIS Pro button called 'Show 3D Lots Creation', and this button should use the "3DAnalystSurfaceVolume32" image resource from ArcGIS Pro for its image. None of the newly created controls shall appear on the AddInTab. Use the 'Show 3D Lots Creation' button to instantiate a new '3D Lots Creation' dockpane with a text box to display the selected parcel ID, a drop-down to select the multi-patch resolution (0 - rough through 100 - fine in 10 increments), and a button to create the 3D lot called 'Create 3D Lot'. The 'Create 3D Lot' button is a button that shows an image (ArcGIS Pro.exe 3DAnalystSurfaceVolume32 resource), and the 'Create 3D Lot' button text appears to the right of the image. 2. Rebuild MyCopilotAddin. 3. Run and debug MyCopilotAddin.

Step 2 Wire up the lot feature selection
- To wire up the lot/parcel feature selection, we need to display the parcel ID in the dockpane and remember the selected parcel's polygon geometry. Use the following prompt:
Subscribe to the MapView SelectionChanged event and use the first feature from the selection in the 'Lots' feature layer to query the 'Lots' feature layer for the 'Name' field value. Update the SelectedParcelId property in the dockpane with this "Name" attribute column's value in order to display it in the Dockpane. If no parcel has been selected on the map, display 'select a parcel lot' in the SelectedParcelId text box. Create a property of the type Polygon named "SelectedGeometry" and, when assigning the SelectedParcelId, store the cloned value of the "Shape" attribute column as a Polygon in the SelectedGeometry property. 2. Optional: Debug and run the app and confirm that the SelectedParcelId text box and the Polygon in the SelectedGeometry property are set as required.
Step 3 Implement the logic to create the 3D mesh polygon Implement the logic to create the 3D lot when the user clicks the "Create 3D Lot" button in the DockPane. This involves using the selected parcel geometry, generating a multi-patch based on the selected resolution, and adding it to a new feature layer.
- In the Copilot Chat window, type the following prompt:
Implement the 'Create 3D Lot' button action so it divides the selected parcel geometry into a grid of envelopes, clips the parcel geometry with each envelope, and extrudes the resulting polygons to create a 3D multi-patch. The multi-patch is then added to the "Lot MultiPatch" feature layer in the active map. If the "Lot MultiPatch" layer is not found, the operation is aborted. The method requires a valid parcel geometry to be selected. If no geometry is selected, a message box notifies the user. The resolution of the grid can be adjusted using the SelectedResolution property, with a default value of 10 if not specified. The resolution of the grid specifies the number of envelopes used to clip the parcel geometry across the X and Y axes. The method also ensures that the "Lot MultiPatch" layer exists in the active map. If the layer is not found, the operation is aborted, and the user is notified via a message box. This method performs asynchronous operations, including geometry processing and interaction with the map's surface to retrieve Z values. It must be executed on the QueuedTask context to ensure thread safety when interacting with ArcGIS Pro's API. 2. Debug and run the app and confirm that the 3D mesh polygon is created using the selected resolution.

- Sometimes when you run the app, you will encounter a runtime error or exception. If this happens to you, let Copilot know what you did when the error occurred and paste a copy of the error message into the prompt window. For example:
At runtime, when I clicked the "Create 3D Lot" button, the application failed with this error: Unexpected HRESULT has been returned from a call to a COM component.
4. Or sometimes the expected functionality doesn't work, if this is the case specify the problem and let Copilot fix the issue, for example:
The generated 3D Lot polygon is not displaying in the 3D mapview.
or
The generated 3D polygon feature appears below the surface.
5. If you get any more exceptions, rinse and repeat.
