{"id":23,"date":"2010-12-06T11:50:52","date_gmt":"2010-12-06T19:50:52","guid":{"rendered":"http:\/\/gis.qtools.com\/blog\/"},"modified":"2016-04-11T12:06:13","modified_gmt":"2016-04-11T19:06:13","slug":"part-3-setting-up-visual-studio","status":"publish","type":"page","link":"https:\/\/gis.qtools.com\/blog\/tutorials\/vba-to-c-add-in\/part-3-setting-up-visual-studio\/","title":{"rendered":"Part 3: Setting Up Visual Studio"},"content":{"rendered":"<p><strong>Tutorial Navigation<\/strong> | Prior: <a href=\"..\/part-2-adding-the-vba-utility-to-arcmap\/\">Part 2: Adding the VBA Utility to ArcMap<\/a> | Next: <a href=\"..\/part-4-creating-new-add-in-project\/\">Part 4: Creating New Add-in Project<\/a><\/p>\n<p>ESRI Add-ins can be created with either Microsoft&#8217;s .NET languages (C#, VB.NET, C++), or Java. This tutorial uses C# (C Sharp).<\/p>\n<p>Building and testing Add-ins requires a properly configured development environment which consists of ArcGIS, Visual Studio, and the ArcObjects SDK (Software Development Kit). The SDK must be installed last, since it checks for a supported IDE (Integrated Development Environment) and installs wizards, help, and code snippets.<\/p>\n<h1>Install Visual Studio<\/h1>\n<p>If you already have a supported version of Visual Studio installed, you may skip this section.<\/p>\n<p>As of this writing, the Express edition of Visual Studio 2010 is <em>NOT <\/em>supported by the ArcObjects SDK installer. In general, you can use any other edition of Visual Studio 2008 or 2010.<\/p>\n<p>This tutorial will use Visual Studio C# 2008 Express, which is free and available for download from the <a href=\"http:\/\/www.microsoft.com\/express\/Downloads\/\" target=\"_blank\">Microsoft website<\/a>.<\/p>\n<p>Run the Visual Studio installer and perform a default installation. If you are new to Visual Studio or C#, you may wish to spend some time learning the IDE and language basics.<\/p>\n<h1>Install the ArcObjects SDK<\/h1>\n<p>If you have not yet installed ArcGIS Desktop 10, please do so before continuing.<\/p>\n<h2>Instructions<\/h2>\n<p>Launch the ArcGIS Desktop 10 installer. In the <em>ArcGIS Desktop Developer Resources<\/em> section click <em>Setup <\/em>for the <em>ArcObjects SDK for the Microsoft .NET Framework<\/em>.<\/p>\n<p><img decoding=\"async\" src=\"\/\/gis.qtools.com\/tutorials\/vba_to_cs\/images\/ArcGIS10_SetupMenu.png\" \/><\/p>\n<p>Once the SDK installation commences, you can accept all of the defaults to complete the installation. However, if any of the VCPP (Visual C++) items are pre-selected for installation, you can set them to not install as shown below.<\/p>\n<p><img decoding=\"async\" src=\"\/\/gis.qtools.com\/tutorials\/vba_to_cs\/images\/ArcObjectsSDK10_Install.png\" \/><\/p>\n<p>After the SDK installation finishes, launch Visual Studio.<\/p>\n<p>A default Visual Studio Express installation will not let you choose a folder location in which to store your project source files when creating a new project (they are always stored under a root folder specified in options). This behavior can be changed by opening the <em>Options<\/em> dialog found on the <em>Tools<\/em> menu, selecting the <em>Projects and Solutions<\/em> item in the list, and checking the box next to <strong><em>Save new projects when created<\/em><\/strong>.<\/p>\n<p>To check that the SDK was successfully integrated with the IDE, select <em>New Project&#8230; <\/em>from the<em> File <\/em>menu. Expand the list on the left of the <em>New Project <\/em>dialog and select the <em>Desktop Add-Ins<\/em> item to ensure the Add-in templates have been installed as shown below.<\/p>\n<p><img decoding=\"async\" src=\"\/\/gis.qtools.com\/tutorials\/vba_to_cs\/images\/SDK10_VSCS2008_NewProjDlg.png\" \/><\/p>\n<p>Click <em>Cancel <\/em>to close the dialog.<\/p>\n<p>If the templates are not there, try re-installing the SDK. For further trouble-shooting, searching the posts in the <a href=\"http:\/\/forums.arcgis.com\/forums\/20-ArcObjects-All-Development-Languages\" target=\"_blank\">ArcGIS Resource Center <\/a>for &#8220;SDK installation&#8221; is a good place to start.<\/p>\n<p>Lastly, check that the code snippets are available in Visual Studio. Select <em>Code Snippets Manager&#8230;<\/em> from the <em>Tools<\/em> menu. Check that there is an <em>ArcObjects<\/em> item listed. If not, expand this for instructions to add them (<a href=\"#\" onclick=\"xcollapse('X0001');return false;\">+\/-<\/a>)<\/p>\n<div id=\"X0001\" style=\"display: none; background: transparent;\">\nOn the <em>Code Snippets Manager<\/em> dialog, click on <em>Add&#8230;<\/em> and browse to <em>\\Program Files\\Microsoft Visual Studio 9.0\\Common 7\\IDE\\VCSExpress\\Snippets\\ArcObjects<\/em>, click <em>Select Folder<\/em> and <em>OK<\/em>. ArcObjects will now appear in the <em>Insert Snippet<\/em> context menu. <\/p>\n<\/div>\n<p>Although the snippets are not required, they can be quite useful for common operations and starting points for further enhancement. To use a snippet, right-click at an insertion point in your code and select <em>Insert Snippet&#8230;<\/em> from the context menu. You can also browse the snippets in the <em>Code Snippets Manager<\/em> to view their descriptions.<\/p>\n<p><strong>Tutorial Navigation<\/strong> | Prior: <a href=\"..\/part-2-adding-the-vba-utility-to-arcmap\/\">Part 2: Adding the VBA Utility to ArcMap<\/a> | Next: <a href=\"..\/part-4-creating-new-add-in-project\/\">Part 4: Creating New Add-in Project<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tutorial Navigation | Prior: Part 2: Adding the VBA Utility to ArcMap | Next: Part 4: Creating New Add-in Project ESRI Add-ins can be created with either Microsoft&#8217;s .NET languages (C#, VB.NET, C++), or Java. This tutorial uses C# (C Sharp). Building and testing Add-ins requires a properly configured development environment which consists of ArcGIS, [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":8,"menu_order":3,"comment_status":"open","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-23","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/pages\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":3,"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/pages\/23\/revisions"}],"predecessor-version":[{"id":84,"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/pages\/23\/revisions\/84"}],"up":[{"embeddable":true,"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/pages\/8"}],"wp:attachment":[{"href":"https:\/\/gis.qtools.com\/blog\/wp-json\/wp\/v2\/media?parent=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}