PROBLEM
Custom components such as commands or tools can be debugged by running an ArcGIS application by way of the Visual Studio .NET 2003 debugger. If the full or beta version of the .NET Framework 2.x is installed, one of the following behaviors occurs when an ArcGIS application is used as the debug target in Visual Studio .NET 2003:
· 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.
Note:
If the components are built independently and the ArcGIS application is started outside of a debug session, the components operate as expected.
Note:
ArcGIS versions 9.0 and 9.1 support development with Visual Studio 2003, which targets version 1.1 of the .NET Framework. The .NET Framework 2.x can be installed with previous versions of the .NET Framework.
This information only applies to ArcGIS versions 9.0 and 9.1.
When an unmanaged application such as ArcMap needs to load a managed component written in .NET and registered for Component Object Model (COM) interoperability, the unmanaged application loads the most recent version of the .NET framework.
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.
Note:
If the use of the .NET framework 1.1 in the ArcGIS applications is forced, this prevents the debugging of the component in Visual Studio .NET 2005. To debug in Visual Studio 2005, remove the application configuration file(s).
<ApplicationName>.<ApplicationExtension>.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>
Get help from ArcGIS experts
Download the Esri Support App