Skip to content

Restoring missing Build Events in Delphi 2007

If you have a Delphi 2007 project that was ported from Delphi 2006, then you may be missing the build event project options.  The .dproj file that Delphi 2006 creates is does not have a final XML element named PropertyGroup that Delphi 2007 uses.  Without that final PropertyGroup, Delphi 2007 will not enable Build Events as an option.  If you manually edit your .dproj file, just the following lines:

<PropertyGroup>
PropertyGroup>

So that the .dproj files looks like this at the end of the file:

<PropertyGroup>
PropertyGroup>
Project>

After making that change, the next time you open that project with Delphi 2007 and select Options from the Project menu, you’ll see Build Events listed.  This only appears to happen if you migrate a Delphi 2006 project over to Delphi 2007.  If you create the project from scratch, you’ll see Build Events list.  That’s how I was able to determine what was missing, I just created a new project and compared the .dproj files.