Home > OS >  Delphi RAD Server 10.4.2 Two packages sharing common units - Error to load package
Delphi RAD Server 10.4.2 Two packages sharing common units - Error to load package

Time:09-20

I had a RAD Server package ProjA.bpl with several endpoints and some of them use a unit called UntAccess.pas.
Now I created another server package ProjB.bpl with different endpoints than ProjA and adjusted emsserver.ini configuration file section [Server.Packages] to call both packages .

The problem appeared when EMS Server starts, it shows the following error message :

{"Thread":32068,"Error":{"Type":"Package","Filename":"C:\Users\Public\Documents\Embarcadero\Studio\21.0\Bpl\Win64\ProjDevAPI.bpl","Exception":"EPackageError","Message":"Cannot load package 'ProjB.bpl' It contains unit 'UntAccess.pas', which is also contained in package 'ProjA.bpl'"}}

How can I share same units among tow or more RAD Server .bpl packages ?

Environment : Delphi 10.4.2 , Windows 10

CodePudding user response:

Create a new package containing that common unit (and probably more in the future). Then add this package as required to ProjA and ProjB.

  • Related