# ArcObject **Repository Path**: gux/ArcObject ## Basic Information - **Project Name**: ArcObject - **Description**: ArcObject .Net 与 VS 2013 请将此存储库作为备忘录,引导您完成 AO 设置、调试和开发... - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-08-21 - **Last Updated**: 2023-08-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ArcObject .Net with VS 2013 # Please take this repository as a memo to walk you through the AO setup, debug and development... If you can't do, you teach :) ## Prerequisites: Installation## ## Lesson 1: Setup Environment and Debug ## OK, let's start up our first AO project in VS2013! On menu bar: FILE -> New Project, then open the tree structure inside the left pane on the opening dialog, find Visual C# -> ArcGIS -> Desktop Add-ins -> ArcMap Add-in. In the ArGIS Add-Ins Wizard, make sure to check "Button" option under Add-in Types. This will create a template of a button control for ArcMap. You should be able to find a cs file with name "Button1.cs". Please replace this file with the on at [here](https://github.com/hellocomrade/arcobject/blob/master/lesson1/Button1.cs). Before we build the button control, open Soultion Explorer of your VS 2013, right-click on the project name and choose properties. Double Check 2 places: 1. Target framework under Application section should be ".NET Framework 4"; 2. Under Debug section, make sure the "Start external program" is set as your ArcMap program; Still under Solution Explorer, right click on the References and choose "Add ArcGIS References...". We need the following two references in order to build this solution. They are not included by this default template: 1. ESRI.ArcGIS.Geometry 2. ESRI.ArcGIS.Carto Now you are ready to build the solution! Before you do that, there is still some housekeeping we have to do on ArcMap end. Go to your ArcMap installation folder, usually it is located at: C:\Program Files (x86)\ArcGIS\Desktop10.3\bin, find a file named "ArcMap.exe.config". Open it up with administrator privilege. It is an XML file and search the following section located at the top of the file: ```xml ``` By default, ArcMap is configured to run against .Net Framework Runtime 2.0, which is a conflict with the button control we are going to build in VS 2013. Comment out that line and uncomment the line above to enable .Net Framework Runtime 4.0 for ArcMap. OK, now you should be able to build it without any issue. In order to make sure we are on the same page for the following section, please check your "config.esriaddinx" file. You can find this file under Solution Explorer. Here is what I have (I did remove unrelated sections) ```xml ArcMapAddin1 ......