简体   繁体   English

Delphi XE-严重:F1027找不到单位:'System.pas'或等效的二进制文件(.dcu)

[英]Delphi XE - Fatal: F1027 Unit not found: 'System.pas' or binary equivalents (.dcu)

During compilation of Delphi project, following error is given by the compiler: 在Delphi项目的编译过程中,编译器给出以下错误:

Fatal: F1027 Unit not found: 'System.pas' or binary equivalents (.dcu) 致命:F1027找不到单元:“ System.pas”或等效的二进制文件(.dcu)

This happens only when building though msbuild using TFS build system. 仅当使用TFS生成系统通过msbuild进行生成时,才会发生这种情况。

Works fine when executed through command line as below. 通过如下命令行执行时工作正常。

Command:C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\msbuild.exe E:\\Src\\Project\\sample.groupproj /v:m /t:Build /p:Config=Release 命令:C:\\ Windows \\ Microsoft.NET \\ Framework64 \\ v2.0.50727 \\ msbuild.exe E:\\ Src \\ Project \\ sample.groupproj / v:m / t:Build / p:Config = Release

The following execution through MSbuild fails: 通过MSbuild的以下执行失败:

<Exec Command="C:\\Windows\\Microsoft.NET\\Framework64\\v2.0.50727\\msbuild.exe E:\\Src\\Project\\Sample.groupproj /v:m /t:Build /p:Config=Release"/>

Note:Following env variables are set : BDS,BDSLIB,BDSCOMMONDIR,BDSINCLUDE 注意:以下环境变量已设置:BDS,BDSLIB,BDSCOMMONDIR,BDSINCLUDE

When executed through CCNET dcc32.exe has extra arguments such as -I,-LE,-LN,- O,-R,-U,-NB,-NH,but execution through TFS does not have the these argument list. 通过CCNET执行时,dcc32.exe具有额外的参数,例如-I,-LE,-LN,-O,-R,-U,-NB,-NH,但是通过TFS执行不具有这些参数列表。

Any thoughts on how to resolve these errors. 关于如何解决这些错误的任何想法。

Thanks in Advance.... 提前致谢....

It is possible that your environment is not configured properly. 您的环境可能配置不正确。 First call the RSVARS.BAT file located in the BIN directory of your Delphi installation prior to calling msbuild. 在调用msbuild之前,首先调用位于Delphi安装的BIN目录中的RSVARS.BAT文件。

If you are calling this from another build system, my suggestion would be to create a simple batch/cmd file that will call RSVARS.BAT followed by executing MSBUILD and have your build system invoke that instead. 如果您是从另一个构建系统调用的,我的建议是创建一个简单的批处理/ cmd文件,该文件将调用RSVARS.BAT,然后执行MSBUILD,然后让您的构建系统调用该文件。

If you try to invoke RSVARS.BAT separately, it will modify its copy of the environment then exit, which will effectively do nothing to the parent environment. 如果尝试分别调用RSVARS.BAT,它将修改其环境副本,然后退出,这实际上对父环境无效。 Adding a call to RSVARS.BAT from within the MSBUILD script will also fail for the same reason. 同样,从MSBUILD脚本中添加对RSVARS.BAT的调用也将失败。 The RSVARS.BAT must be called from the same contextual environment (or higher) as the MSBUILD task. 必须从与MSBUILD任务相同的上下文环境(或更高版本)中调用RSVARS.BAT。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未找到Delphi XE-F1027单元:激活试用版时的&#39;System.pas&#39;或二进制等效(.dcu) - Delphi XE - F1027 Unit not found: 'System.pas' or binary equivalents (.dcu) upon Activation of trial version 未找到单元:&#39;System.pas&#39; 或二进制等效项 (.dcu):在 jenkins 上编译 - Unit not found: 'System.pas' or binary equivalents (.dcu) : Compiling on jenkins Delphi XE3:[dcc32致命错误] Unit5.pas(7):F1026找不到文件:“ RzEdit.dcu” - Delphi XE3: [dcc32 Fatal Error] Unit5.pas(7): F1026 File not found: 'RzEdit.dcu' delphi调试不包括system.pas - delphi debugging exclude system.pas 错误:找不到F1026文件:&#39;System.Actions.dcu&#39;从XE3切换回Delphi XE2 - Error: F1026 File not found: 'System.Actions.dcu' switching back to Delphi XE2 from XE3 将 Delphi .dcu 反编译为 .pas - Decompiling Delphi .dcu to .pas 从InitTable获取单元名称 - hack System.pas - Get Unit Name from InitTable - hack System.pas F2063无法在Delphi XE4中编译使用过的单元&#39;QuickPDF0724.pas&#39;&#39;错误 - F2063 Could not compile used unit 'QuickPDF0724.pas'' error in Delphi XE4 Delphi XE2中的Dcu - Dcu in Delphi XE2 将旧的Delphi 7代码迁移到Delphi XE-找不到QForms.dcu - Migrating old Delphi 7 code to Delphi XE - QForms.dcu not found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM