简体   繁体   English

如何为Delphi项目执行MSBUILD的“试运行”?

[英]How can I perform a 'dry run' of MSBUILD for a Delphi project?

if I launch the RAD Studio command prompt and run 如果我启动RAD Studio命令提示符并运行

msbuild /t:Rebuild msbuild / t:重建

in the project directory, msbuild will show the full command line to invoke dcc32, including all path settings. 在项目目录中,msbuild将显示完整的命令行来调用dcc32,包括所有路径设置。 (see Is there a Delphi library which returns all effective source paths for a project? ) (请参阅是否有一个Delphi库可以返回项目的所有有效源路径?

If I only want to capture this msbuild console output in a file, and do not need the compiler execution, is there a way to run msbuild only to display which actions it will perform? 如果我只想在文件中捕获此msbuild控制台输出,并且不需要执行编译器,是否有一种方法可以运行msbuild仅显示其将执行的操作? I have checked the msbuild options but there seems to be no 'dry run' switch. 我检查了msbuild选项,但似乎没有“空转”开关。

One possible (but amateurish) solution could be to modify the PATH so that msbuild will not find the compiler. 一种可能的(但业余的)解决方案是修改PATH,以便msbuild无法找到编译器。

您可以使用自己的应用程序替换dcc32.exe,该应用程序将记录命令行并退出。

I don't think this is possible. 我认为这是不可能的。 Also I don't think that you will have success by modifying the PATH variable. 另外,我认为修改PATH变量不会成功。 As far as I knwo the CSC task will not use that to locate where the csc.exe is located. 据我所知,CSC任务不会使用它来定位csc.exe的位置。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM