Posted by: Jeff Germain | February 14, 2007

Debugging Custom ArcGIS 9.1 Components in Visual Studio .NET 2003

If you have both the .NET 1.1 and 2.0 Frameworks installed on your development machine you will run into troubles when trying to debug ArcGIS 9.1 components written on the .NET 1.1 Framework. This is because ArcMap is an unmanaged application and as such when it initializes it loads the most current .NET Framework installed on the system. Not to fret though as it’s easily overcome using a configuration file.

Simply copy the following to a text file and save it as <ApplicationName>.<ApplicationExtension>.config
So, a config file for ArcMap would be named ArcMap.exe.config.

<?xml version=”1.0″ encoding=”utf-8″ ?>
<configuration>
<startup>
<supportedRuntime version=”v1.1.4322″ />
</startup>
</configuration>

Save this file to the ArcGIS bin directory. The default location for this directory is C:\Program Files\ArcGIS\Bin.

Now you’re set to debug .NET 1.1 components. When you need to debug .NET 2.0 components simply rename the file to ArcMap.exe.config.xxx.

You can read more from ESRI here.

Leave a response

Your response:

Categories