VSoftTechnologies/DUnitX

Project version information is deleted when compiled with DUnitX ?

alan008 opened this issue · 4 comments

When I build a project with Delphi 11 Alexandria built-in version of DUnitX, even if in project options I set checkbox "Include version information", when I biuld the project, resulting Exe have no version information.

What causes this behavior? Is it a Delphi bug or some DUnitX unit "rewrites" VerInfo somehow?

This has nothing to do with dunitx, it doesn't do anything with version info, it's a library.

Ahh, I've found the cause. When I create testing project via Delphi IDE main menu File - New - DUnitX project (Delphi), created stub for dpr-file doesn't contain the line {$R *.res}. Without it version info doesn't link to exe-file (even if project option to include version info is swithed on).

Why does version info matter in a unit test project anyway?

In general case it may not matter. In my particular case it matters, because code from other units (normal project units, not tests) uses VerInfo via JCL's TJclFileVersionInfo - for example to log stack traces on exceptions into log file, with version information included (this code assumes that version information MUST exist).
I've added $R directive and that works for me. I just think, that DPR stub for testing project without $R is not quite correct.