ESRI .NET Code Converter Add-in
This add-in works for VB.NET and C# projects. It converts solutions that were built against ArcGIS 8.3 to work with ArcGIS 9. You can convert either the active solution, or use the batch option to convert many solutions at a time.
The steps carried out for each solution are as follows:
- Code using ArcGIS 8.3 namespaces is changed to use ArcGIS 9 namespaces. For
example:
"Dim pPoly As ESRI.ArcObjects.Core.IPolygon"will be converted to:
"Dim pPoly As ESRI.ArcGIS.Geometry.IPolygon" - The Imports (Visual Basic .NET) or 'using' (C#) namespace statements are
removed and appropriate new Imports/using namespace statements for ArcGIS
9.0 namespaces are added.
For example:
"Imports ESRI.ArcObjects.Core"will be removed and replaced by the namespaces required by the code, perhaps:
"Imports ESRI.ArcGIS.esriSystem" "Imports ESRI.ArcGIS.Geometry" - ArcGIS 8.3 assembly references are removed from the project and the appropriate ArcGIS 9 assembly references are added.
- The solution is built if there is no preceding conversion error.
The add-in dialog is shown below.
A log file of the conversion details will be placed in the same folder as the VB project. The log will be shown after the conversion finishes.
Note: the code converter may fail to convert code if a form or class is not open in code view.
Project backup option
The code converter saves all its work, you will not be able to undo the changes without first having taken a backup of the solution. A checkbox at the bottom left of the dialog provides the option of an automatic backup of the Visual Basic projects. This is placed in a folder alongside the solution, with the same name as the solution appended by '_backup'. For complete caution you should take your own backup of your files rather than rely on this automatic backup.
Batch conversion dialog
Use the Batch Conversion dialog to convert many solutions at once.
Use the file browser on the left of the dialog to select a folder. Clicking the Add button will select all the .NET solutions in that folder and recursively any sub-folders. You can alter the list of solutions selected for conversion with the Remove and Clear buttons. A single log file is created for the conversion of all the selected projects. You can specify the location of this log file at the lower left of the dialog.
The batch conversion honors the options set on the main add-in dialog, for example the project backup option.
How to set up the ESRI add-ins for Visual Studio .NET