Blank lines instead of a task console output in MSBuild

故事扮演 提交于 2019-12-06 02:59:20
Ondrej Kelle

Here's a possible solution:

  1. Back up your files, etc.
  2. Open a .NET Framework SDK v2.0 command prompt.
  3. Disassemble Borland.Build.Tasks.Delphi.dll (located in your $(BDS)\bin directory):

    ildasm Borland.Build.Tasks.Delphi.dll /out=Borland.Build.Tasks.Delphi.il

  4. Edit Borland.Build.Tasks.Delphi.dcctask.xml (created by the previous step) and comment out the Ignore subnode of the OutputParsing node.

  5. Reassemble it:

    ilasm Borland.Build.Tasks.Delphi.il /dll

  6. Register a strong name exception for it:

    sn -Vr Borland.Build.Tasks.Delphi.dll

If you turned off the quiet mode as described in this answer, building your Delphi projects with MSBuild should now show the detailed compiler output.

Add --depends to DCC32 command line or /p:DCC_OutputDependencies=true to msbuild, it will output a .d file that can be easily parsed, like the example below:

C:\publico\BUILD\temp\YourDPR.exe: YourDPR.dpr \
        C:\blabla blabla\FrameWork\Base\biblioteca\dcus\unit15.dcu \
        C:\blabla blabla\FrameWork\Base\biblioteca\dcus\unit13.dcu \
        C:\bla bla\bla\LIBD5\Units\unit12.dcu \
        C:\blabla blabla\FrameWork\Base\biblioteca\rxlib\units\unit1.dcu \
        C:\blabla blabla\FrameWork\Base\biblioteca\rxlib\units\unit13.dcu \
        C:\bla bla\bla\LIBD5\Units\unit1.dcu \
        C:\bla bla\bla\LIBD5\Units\unit12.dcu \

Ps. You can hide those blank msbuild lines with /p:DCC_Hints=false;

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!