Tutorial :How can I perform a 'dry run' of MSBUILD for a Delphi project?


if I launch the RAD Studio command prompt and run

msbuild /t:Rebuild

in the project directory, msbuild will show the full command line to invoke dcc32, including all path settings. (see Is there a Delphi library which returns all effective source paths for a project?)

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? I have checked the msbuild options but there seems to be no 'dry run' switch.

One possible (but amateurish) solution could be to modify the PATH so that msbuild will not find the compiler.


You can replace dcc32.exe with your own application which will log the command line and exit.


I don't think this is possible. Also I don't think that you will have success by modifying the PATH variable. As far as I knwo the CSC task will not use that to locate where the csc.exe is located.

Sayed Ibrahim Hashimi

My Book: Inside the Microsoft Build Engine : Using MSBuild and Team Foundation Build

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »