PROBLEM

ArcGIS Snippets have problems in Visual Studio 2005

Last Published: April 25, 2020

Description

There are several scenarios in which ArcGIS Snippets have problems in the Visual Studio 2005 (VS2005) from the .NET SDKs. The solution for all of the undesired behavior is the same. The following list illustrates the different behaviors:

1. When opening VS2005 a message appears "Indexing Code Snippet folders..." that takes a long time to process and VS2005 seems to run slowly.

2. When inserting an ArcGIS Snippet by right-clicking in the VS2005 code editor and selecting 'Insert Snippet', the option for ArcGIS Engine and/or ArcGIS Desktop repeats itself several times.

3. When inserting an ArcGIS Snippet by right-clicking in the VS2005 code editor and selecting 'Insert Snippet', the option for ArcGIS Engine and/or ArcGIS Desktop appears. When selecting a snippet to insert, nothing is inserted.

Cause

Either the .NET SDK (Desktop or Engine) has been installed multiple times or the ArcGIS snippets have been deleted from the hard drive.

ArcGIS Snippets are just XML files that get read and portions are inserted into the VS2005 code editor. The VS2005 IDE keeps track of all snippets that are installed on the system in an index file. This index file is maintained wholly by VS2005. Performing an uninstall/reinstall of any 9.2 .NET SDK, moving or renaming of any ArcGIS Snippets causes the index file to get out of sync and causes the problems described above.

Solution or Workaround



  1. Close Visual Studio 2005.
  2. Delete the Visual Studio 2005 snippets index file located at:
    C:\Documents and Settings\<YOURUSERNAME>\Local Settings\Application Data\Microsoft\VisualStudio\8.0\1033\ExpansionsXML.xml
  3. Reopen Visual Studio 2005.

    Note:
    The snippet index file automatically regenerates the next time VS2005 opens.

  4. If the "Indexing Code Snippet folders..." message from the "Code Snippet Manager" dialog box continues to take a long time after performing the above steps, it may also be necessary to clean up any duplicate or missing directories in the Code Snippet Manager. This can be done by selecting Tools > Code Snippet Manager from the VS2005 menus. Ensure that the duplicate and missing directories (as shown with a possible error icon) are removed for all Language types by highlighting the Location folder and clicking the Remove button.

Article ID:000009058

Software:
  • ArcMap 9 x
  • ArcGIS Engine 9 x

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic