views:

137

answers:

1

In my TFSBuild.proj I have the following Exec commands:

<Target Name="AfterCompile">
    <Exec Command="@echo Program.cs(12,20): warning CS1002: ; missing"/>
    <Exec Command="@echo Program.cs(13,20): Warning CS1003: ;; missing"/>
    <Exec Command="@echo Program.cs(14,20): error CS1004: ;;; missing"/>
</Target>

The TFS build fails, because it parses the output and sees an error reported in it.

I get the following output in buildlog.txt:

Program.cs(12,20): warning CS1002: ; missing
Program.cs(13,20): warning CS1003: ;; missing
Program.cs(14,20): error CS1004: ;;; missing
c:\bw\10\BuildType\TFSBuild.proj(228,5): error MSB3073: The command "@echo Program.cs(14,20): error CS1004: ;;; missing" exited with code -1.

But I don't get these errors reported in the result details:

TFS result after exec task containing warnings and errors

While errors and warnings are reported on a normal project build with a link to a file containing the set with found warnings and errors:

TFS result after normal project build containing warnings and errors

Any idea on getting the list of errors and warnings parsed out of the exec output and into the TFS reporting?

A: 

Solved my own question as follows:

I created a myexec.proj file that does the execution of the Exec.

In TFSBuild.proj I execute the solution using . The output is now automatically parsed for errors and warnings.

Serge van den Oever