Now I’d like to introduce how I find this bug.
I’d like to modify AddMany (CodeCentral entry #25077) project without breaking the original source code. Thus I did the following,
- copy the project file AddMany.dproj to Lextm.AddMany.dproj.
- open the new project in Delphi for .NET.
Then the issue came that IDE thought the output should be Lextm.AddMany.dll while the correct one is AddMany.dll because the real project file is still AddMany.dpr.
Also when I tried CBC’s Delete Project Target, CBC said that target does not exist. Then I debugged inside and saw that IOTAProject.ProjectOptions.TargetName is wrong. The returned string is
***\Lextm.AddMany.dll while the expected is
Luckily the workaround is described here so if you also meet this issue you can try my code.
This bug is logged as QC#57890. And it applies to both Delphi for Win32 and .NET DLL/BPL projects. Strangely it does not affect EXE projects.