Why cant I set a version info in a Dunit Test projet? The checkbox is disabled for this projetct, but not for other projects. See the screenshot:
相关问题
- Is there a Delphi 5 component that can handle .png
- Is there a way to install Delphi 2010 on Windows 2
- Is TWebBrowser dependant on IE version?
- iOS objective-c object: When to use release and wh
- DBGrid - How to set an individual background color
相关文章
- Best way to implement MVVM bindings (View <-> V
- Windows EventLog: How fast are operations with it?
- How to force Delphi compiler to display all hints
- Coloring cell background on firemonkey stringgrid
- HelpInsight documentation in Delphi 2007
- Can RTTI interrogate types from project code at de
- What specifically causes EPrivilege to be raised?
- Equivalent to designer guidelines in code
You may be missing the {$R *.res} directive in your test project's source. It needs to be in the .dpr or you won't be able to use this feature in the project options.
It should be there by default but occasionally it can get screwed up when adding or removing a unit from a project. When this happens it will look like:
If this happened and a developer didn't know what they were looking at they may have just deleted the offending line.
Additionally, if the test project started out as a command line project it may not have had this directive to begin with.
DUnit unit test projects are not constructed like other delphi projects, and that is why you see that it has no resource file by default, and that in turn, was why the versioninfo tab was disabled until you put the
{$R *.RES}
declaration in yourself.DUnit projects can be built in one of two configurations, using a GUI Test Runner (which uses the VCL, but which you typically should not modify, the GUI is fixed in stone), or a console mode test runner. While a console application could have a resource file linked, and could therefore have version information, and in fact many console applications do so, the reason you are seeing what you are seeing is that DUnit's test runner framework and unit-test-projects are not constructed in the way you are used to.
This in turn, confuses the IDE, and the IDE disables the relevant sections. You may be able to add the {$R} back again, and that seems to have worked, since you accepted Kenneth's answer, however I just wanted to add some background information that might help future people who encounter this problem.