Sep 192004

Don’t install .NET 1.1 Service Pack 1 on your Delphi 8 development machines. It has been reported in the newgroups that Delphi 8 has trouble compiling projects after .NET 1.1 Service Pack 1 has been installed. The issue is immediately apparent in Delphi 8 with update 2 applied, but can also affect earlier versions of Delphi 8. This also affects the Delphi “Diamondback” preview distributed to BorCon attendees.

The .NET 1.1 SP1 does not affect applications or assemblies produced by Delphi 8. The only thing affected is the Delphi compiler on the development machine. You can continue to develop your apps on a .NET 1.1 non-SP1 machine and deploy to .NET 1.1 SP1 machines without any issues.

The workaround proposed on the newsgroups of deleting and regenerating the .dcpil files for imported .NET assemblies is an incomplete solution. This will get you far enough to compile source that links to the .NET Framework assemblies, but it won’t enable you to compile against prebuilt .dcuil units or link against Delphi packages.

The cause of this problem is that the Delphi compiler tracks .NET metadata tokens too closely. The .NET 1.1 Service Pack 1 adds some new symbols to some of the core assemblies, which changes the metadata token values of older symbols. Microsoft is well within their rights to make such modifications, since assemblies cross-reference each other by symbol name, not by token value.


If you have installed .NET 1.1 Service Pack 1 and you have not attempted to compile anything in the Delphi 8 IDE, just uninstall the service pack and reinstall the .NET 1.1 framework on your development machine. It should not be necessary to reinstall Delphi 8 itself.

If you have attempted to recompile code in the Delphi 8 IDE under .NET 1.1 Service Pack 1, you will have newly created .dcpil files (like mscorlib.dcpil) in your Delphi 8 lib directory, bin directory, or in your Borland Projects directory. You must delete these .dcpil files that were generated from the .NET 1.1 SP1 assemblies. Check the file dates of the .dcpil files – mscorlib.dcpil installed with the Delphi 8 product (built against .NET 1.1 pre-sp1) should have the same file date as everything else in your Delphi 8 bin or lib directory. Do not delete the .dcpil files compiled from Delphi package source, such as Borland.Delphi.dcpil or Borland.VCLRTL.dcpil. If you do delete *.dcpil /s across your entire machine, you will have to reinstall Delphi 8 after you remove .NET 1.1 SP1.

Action Item

I am researching a fix for the Delphi 8 compiler. The challenge will be to see if this can be fixed without breaking the DCU file format and invalidating all the .dcuil files in the field. I hope to have a beta ready for evaluation in the next week or so.

Sorry, the comment form is closed at this time.