tags:

views:

194

answers:

2

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 http://stackoverflow.com/questions/970994)

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.

A: 

Hi, 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
Whew! I am so happy it is Delphi (dcc32.exe), not C# (csc.exe) ;)
mjustin
LOL, yeah I read that it was Delphi not sure why I mentioned csc.exe. I never thought of replacing an .exe as gabr mentioned. I thought you wanted a "dry run" for the entire build. I cant speak for the delphi task but in the case of the Csc task you can override the property CscToolPath (which is passed in as the ToolPath. That way you can specify which .exe to use instead of physically replacing the file itself. Check it out.
Sayed Ibrahim Hashimi
+3  A: 

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

gabr
YMMD! I was just thinking of a exe which does nothing, but also writing the logging is perfect :)
mjustin