For my link archive, as I hardly see this (it happens in many Delphi versions and always has to do with missing/wrong DLLs), so always forget how to solve it.
Basically it is the same fix as for Fixing hg.exe “ImportError: DLL load failed: %1 is not a valid Win32 application.”:
If you get the below error when running hg.exe, then you are mixing a 64-bit Mercurial with 32-bit dependencies.
[Wayback] XE2 – “%1 is not a valid Win32 application” when installing a package – embarcadero.delphi.ide with entries by [Wayback] Remy Lebeau and [Wayback] Jeff Overcash:
I don't know what I did, but when trying to install a set of freshly built
Delphi Win32 packages into the IDE, XE2 is giving me this error message now:
{quote}
Can't load package ...
%1 is not a valid Win32 application.
{quote}
a
> Often that is caused by the same named 32 and 64 bit run time packages
> and the OS finding the 64 bit first when the IDE must load the 32 bit. If
> that is the case check your path variable and make sure the 32 bit paths
> appear first.
That was the problem. The Windows PATH variable had a 64-bit folder in front
of the 32-bit folder. Deleted the 64-bit files and the error went away.
Noe I'm getting a new error:
{quote}
The program can't start because <RuntimePackage>.bpl is missing from
your computer. Try reinstalling the program to fix this problem.
{quote}
But the "missing" package is in the same folder as the design-time package
I am trying to install.
Since the design time location is known it is explicitely
loaded, but the run time is implicitly loaded and follows the dll loading rules.
Both are dynamically loaded.
The reason you only see this the next time you restart the IDE is because the
working directory changes to your project directory when you load a project so
if the runtime is there it is found that way, but the next time you load the IDE
the working directory starts in the bin directory.
I thought it was, but turns out the 32-bit output folder had been moved and
the PATH was not updated accordingly. Fixed the PATH and now the packages
install.
–jeroen
Like this:
Like Loading...