在Dunit项目中,并且exe版本信息已禁用,如何将其取回? [英] In a Dunit project and exe version info is disabled, how do I get it back?
问题描述
为什么我不能在Dunit Test项目中设置版本信息?此项目禁用此复选框,但其他项目则禁用.查看屏幕截图:
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:
推荐答案
您可能在测试项目的源代码中缺少{$ R * .res}指令.它必须位于.dpr中,否则您将无法在项目选项中使用此功能.
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:
$R *.res} // notice the missing '{'
如果发生这种情况,并且开发人员不知道他们在看什么,他们可能只是删除了违规行.
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项目中,并且exe版本信息已禁用,如何将其取回?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!