Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Errors - Warnings    [ Add a report in this area ]  
Report #:  100473   Status: Need Feedback
E2213 Invalid package format ... errors
Project:  Delphi Build #:  16.0.4276.44006
Version:    16.0 Submitted By:   Stephen Boyd
Report Type:  Basic functionality failure Date Reported:  10/26/2011 12:47:23 PM
Severity:    Commonly encountered problem Last Updated: 11/1/2011 11:44:33 AM
Platform:    All versions Internal Tracking #:  
Resolution: Cannot Reproduce (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
I am using Delphi XE2 to build a Win32, VCL app on Windows 7 64-bit. I am compiling using run-time packages. I am referencing some of my own packages. Everything seems to be fine until I try to compile both the Debug and Release configurations of the application in the same IDE session. If I try to do this, the first compile works fine. The second compile fails with :

E2213 Invalid package format ... errors.

If I close the project and reopen it, the second compile works. So clearly, there is nothing wrong with the package as the error message would imply. I'm thinking that there is some problem with the IDE. Is it caching files somewhere and not reloading the release version of .DCPs when I change configurations???

To be completely clear, in order to compile both the Debug and Release configurations I need to compile the Debug config, close the project, reopen it and then compile the Release config. While this gets the job done, it is a major PITA.
Steps to Reproduce:
Create a VCL project.
Add a reference to a package.
Add a uses clause for one of the .DCUs contained in the package.
Save the project.
Compile the project using the Debug configuration.
Compile the project using the Release configuration.

You will get an E2213 error.

I have attached a test project.

Unzip the file.
Open the test\WinFormXE2.dproj file.
Compile the Debug configuration.
Compile the Release Configuratin.
You should get the error.
Workarounds
Close & reopen the project between compiles.
Attachment
TestMultiConfig.zip
Comments

Mark Edington (Embarcadero) at 10/26/2011 2:36:58 PM -
I wasn't able to reproduce this using the steps from the QC report.

Most of the attachments you provided in QC are only files and not
project sources. This makes testing with it unfeasible for me. It's
always best when logging a report like this to provide source rather
than binary files.

Having said that, I can see that the project you did provide source for
(WinFormXE2.dproj) lists quite a number of package dependencies and they
are listed under various different configurations in the project options.

I would suggest that you first try placing all of the package
dependencies in the "All configurations - All platforms" section of the
project options.  As part of this, you need to also need to go through
all of the possible "Target" selections at the top of the project
options dialog and remove any overrides from the other configurations.
If the text that appears for the "Runtime packages" entry is in bold,
then there is an override.

Since you are frequently building for multiple configurations you really
need to pay close attention when editing the project options to see
which "Target" is active.  Whenever possible, I suggest keeping all your
settings in the "All configurations - All platforms" configuration / target.

If you can modify the steps so that the problem is reproducible without
having any existing projects to start with, or if you can provide a
simpler test case (with just 2 or 3 projects that include all source) I
will take another look.

I should also add that it would be helpful to be as specific as possible
about how you are compiling the project(s).

Are all of your package projects in a project group along with the
executable(s) that reference them?

The project manager includes options to set the current configuration
for all projects at once in the toolbar at the top, are you using that
or are you manually switching the configuration for each project?

It's worth noting that if you setup project dependencies between your
executable and the package projects it depends on then those packages
will automatically be compiled for the corresponding configuration when
you compile the main program.  Without dependencies, you need to manage
the active configuration for each project yourself.

Are you using "Compile" or "Build" typically, and does that affect when
you see the failure?

Stephen Boyd at 10/27/2011 7:25:03 AM -
*** New Attachment & New Steps to Reproduce ***

Unzip the attachment.

- Open package_test\AurUtility\AurUtilityRXE2.dproj
- Expand Build configurations tree, right click Debug and select Make
- Close project
- Open package_test\AurConfiguration\AuroraConfigurationXE2.groupproj
- Expand AuroraConfigurationRXE2, expand Build configurations right click Debug and select Make
- Expand AuroraConfigurationDXE2, expand Build configurations right click Debug and select Make
- Close project
- Open package_test\AurForms\AurFormsXE2.groupproj
- Expand AurFormsRXE2, expand Build configartions, right click Debug and select Make
- Expand AurFormsDXE2, expand Build configaritons, right click Debug and select Make
- Close project
- Open package_test\test\WinFormXE2.dproj
- expand Build configurations, right click Debug and select Make
- right click Release and select Make

At this point you will get the following error:

E2213 Invalid package format ...


Server Response from: ETNACODE01