The information is disabled in the Dunit project and exe version, how can I return it?

Why can't I install version information in a Dunit Test project? This check box is disabled for this project, but not for other projects. See screenshot:

enter image description here

+8
delphi version delphi-2010 dunit
source share
2 answers

Perhaps you are missing the {$ R * .res} directive in the source of the test project. It must be in .dpr or you cannot use this function in the project settings.

It should be the default, but sometimes it can be corrupted when adding or removing units from the project. When this happens, it will look like this:

$R *.res} // notice the missing '{' 

If this happened, and the developer did not know what they were looking at, they might just have deleted the line in violation.

Also, if the test project was run as a command line project, it might not have this directive to start with.

+13
source share

DUnit unit test projects are not built like other delphi projects, and therefore you see that by default it does not have a resource file, and, in turn, that is why the versioninfo tab was disabled until you put {$R *.RES} declaration in itself.

DUnit projects can be built in one of two configurations using the GUI Test Runner (which uses VCL, but which you usually should not change, the graphical interface is fixed in stone) or a console test runner. Although the console application may have an associated resource file and therefore may have version information, and in fact many console applications do this, the reason you see what you see is because the DUnit test runner framework and unit-test -projects are not built the way you are used to.

This, in turn, confuses the IDE, and the IDE disables the corresponding sections. You might be able to add {$ R} again, and it seems to have worked since you accepted Kenneth's answer, however I just wanted to add some background information that could help future people facing this problem.

+7
source share

All Articles