Using the Delphi for .NET Preview compiler in the Delphi 7 IDE

By: John Kaster

Abstract: An Open Tool for using the preview compiler with the Delphi 7 IDE is available for download

Using the Open Tool API (OTA)

The Delphi QA team at Borland took advantage of improvements to the Delphi 7 IDE Open Tools API to streamline their efforts in testing the Delphi for .NET preview compiler. We are making this Open Tool available as an unsupported plug-in for Delphi 7. It has only been tested with Delphi 7 Enterprise and Architect, but it should also work with Delphi 7 Pro and Personal.

Note! this is an unsupported tool provided by Borland for you to use at your own risk. You can discuss issues you have with it in the borland.public.delphi.netpreview.compiler newsgroup and get peer support. This open tool was developed for internal use, but we have found it so convenient we wanted to make it available for all Delphi 7 users, even though future versions of the Delphi IDE will not require it.


The compiled package you will need to install is on CodeCentral as ID#18889. The installation information provided here is also included in the readme on CodeCentral. You should remember to check on CodeCentral for newer versions of this file periodically, as it may get updated.

Once you have the package extracted from the zip file, in your Delphi 7 IDE select:

  1. Component | Install Packages...
  2. Click the "Add..." button in the upcoming dialog
  3. Open the "DccilIdeIntegrationPackage.bpl"
  4. You will now see "Delphi for .NET command-line compiler IDE integration" in the list of design-time packages

  5. Click OK
  6. You will also notice a new top-level menu item "Delphi for .NET" at the very right end of the Delphi 7.0 menu bar.

The menu will look something like this:
IDE Integration menu
IDE Integration menu

See the Delphi for .NET compiler preview article for more information on the utilities like the CLR Debugger, PEVerify, ILDasm, and Reflector that are referenced by this Open Tool's menu items.

Of particular note are the following menu items:

Hijack IDE

With this menu item checked, all build or run actions of the underlying Delphi 7.0 IDE are redirected to matching actions offered by the Delphi for .NET command-line compiler IDE integration package.

This means, for instance, that the menu item Project | Compile and its associated (default) shortcut Ctrl + F9 will use the dccil.exe command-line compiler to make the current project. Actions that cannot be redirected are turned off and disabled.

You can use this menu item to "morph" the Delphi 7.0 IDE into a "Delphi for .NET" IDE. When this option is enabled, you will notice that certain menu items are disabled since the IDE buttons have been assigned the task:

Hijacked IDE
Hijacked IDE menu

I often forget to turn off IDE hijacking and start getting strange results when compiling Win32 versions of Delphi projects. Hopefully my mention of this will remind you to check this option if the IDE doesn't behave as you expect.

Please note that IDE hijacking has not been tested (by Borland) in the Professional and Personal SKUs, but user feedback indicates that it does work in these SKUs as well.

Automatically run PEVerify

Another checkbox enables running PEVerify after every compile.

PEVeryify results
PEVerify results

Any output from console applications (dccil.exe and peverify.exe) will be directed to the IDE's message view window.

.NET Framework SDK help

This menu item (and its menu shortcut) is sensitive to the text under the caret in the current editor. It could be said to offer "context-sensitive help" if it was not for the known issue documented in the readme. It provides the closest equivalent available.

This .NET Framework SDK Help integration has only been tested with the English .NET Framework SDK online documentation. Online documentation localized for other languages has not been tested.

Options submenu

There are some configuration options to tweak the behavior of the add-in.

Options submenu

These options hint at some other behaviors as well that you may want to know about.

Miscellaneous behavior

There are also some subtle features in the integration tool.

  • The Debug and Run actions from the "Delphi for .NET" menu item trigger an implicit "make" operation for the currently active project.
  • The PEVerify, ILDasm and Reflector actions from the "Delphi for .NET" menu item do not trigger an implicit make.
  • The integration tool only enables external debug information when the "Delphi for .NET -> Debug" menu item is selected. This is a deliberate design decision.
  • External debug information is provided by ".PDB" files. If you wish to globally enable external debug information, you should add a single line containing "-V" to your dccil.cfg file.

  • There is no keyboard shortcut for invoking the "Delphi for .NET | Debug" menu item.
  • The code is fully localizable.
  • All internationalization items are resourcestrings and/or forms, so should somebody wish to see everything in, say, Japanese - well, there is nothing preventing it.


We hope you find this Open Tool a valuable asset when using the Delphi for .NET preview, as has Borland staff.


Server Response from: ETNASC03