- Support Home >
- Knowledge Base >
- Technical Articles >
- Article Detail
Problem: Cannot debug .NET components in ArcGIS applications using Visual Studio .NET 2003
| Article ID: | 29695 |
|---|---|
| Bug Id: | N/A |
| Software: | ArcGIS - ArcEditor 9.0, 9.1 ArcGIS - ArcInfo 9.0, 9.1 ArcGIS - ArcView 9.0, 9.1 |
| Platforms: | Windows 2000, XP, 2003Server |
Description
• The selected ArcGIS application starts normally. However, when the custom component runs, the ArcGIS application exits immediately, the debug session in Visual Studio terminates and Visual Studio returns to development mode.
• The splash screen of the selected ArcGIS application displays. However, the application exits with no errors, the debug session in Visual Studio terminates and Visual Studio returns to development mode.
• The selected ArcGIS application does not start at all nor is the splash screen displayed and Visual Studio returns to development mode.
This information only applies to ArcGIS versions 9.0 and 9.1.
Cause
The debugger in Visual Studio 2003 is only able to work with .NET framework versions 1.0 or 1.1. When it attempts to connect to the application which has loaded version 2.0 of the .NET framework, the debugger is unable to continue and therefore the session is terminated.
The default behavior of the .NET framework is the same regardless of the version against which the .NET components were built. It is important to consider that the application may load many different components that may have been built against different versions of the .NET framework.
Solution or Workaround
To debug .NET components in ArcGIS applications using Visual Studio .NET 2003 on machines with the .NET Framework 2.0 installed, create application configuration files for the ArcGIS applications, forcing the use of version 1.1 of the .NET framework.
The following method creates an example configuration file for ArcMap. Apply this method to create a configuration file for the other ArcGIS applications.
- Start Windows Explorer and locate the folder containing the application. Typically for ArcMap, this folder will be C:\Program Files\ArcGIS\Bin.
- Create a new empty file by right-clicking in the file list pane in Windows Explorer and selecting New.
- Name the file using the following naming convention:
<ApplicationName>.<ApplicationExtension>.config
For example, the ArcMap file is called 'ArcMap.exe.config'. Click Yes in the dialog box that warns about changing the file extension. - Open the newly created .config file and paste the following contents:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>
- Save and close the file.
Created: 8/24/2005
Last Modified: 1/12/2010