6

We have a solution with a lot of projects. One of those projects contains a Visual Studio pre-build event, that auto-generates all code files used in that project. This works rather well on our local machines.

However building it using TFS build it fails with the rather undescriptive "exited with code XY". So, the pre-build event fails, but so far I have been unable to find the output normally generated by that event (console output).

I tried debugging the TFS Build service, but that gave me nothing, I increased the build logging to "Diagnostics" but still nothing. No build log file seems to be generated anywhere.

So is this output available anywhere, and if so where?

Esben Bach
  • 664
  • 4
  • 23

1 Answers1

1

In the "View Summary" view of the build results view, you should see a summary of the number of projects/solutions compiled with an expand/collapse triangle next to it. If you expand that node, you should see a "View Log File" link that will open the raw MSBuild log.

Jim Lamb
  • 25,355
  • 6
  • 42
  • 48
  • 2
    Yes unfortunately that build log does not contain the console output of my "prebuild" event. It just reports that the command failed with an exit code that was not expected. – Esben Bach May 19 '11 at 05:53
  • That's a problem with the tool, not with MSBuild or TFS. It should really put out a useful error message before exiting with a non-zero return code. One thing to keep in mind is thing the build service runs as a service account (usually as Network Service) which means you can't run anything that creates a window and you need to grant any permissions required by your build process to the Network Service account on the build machine. – Jim Lamb May 21 '11 at 01:11
  • 1
    Hi Jim. I tried with a simple bat file that did an "echo" to the console and then forcefully failed. Doing that i am still unable to find the "echo" output of the bat file, which amounts to the same as my console app does. – Esben Bach May 23 '11 at 12:27
  • 1
    @Esben, are you looking at the Activity Log (Workflow) or the MSBuild log (linked to from the Activity log and the Build Summary)? – Jim Lamb May 24 '11 at 18:55
  • Thank you, Jim. That clarified things for me. The "View Log File" hyperlink was not clickable\disabled and I discovered that I have to use a drop folder in the build definition for it to work as expected. ;) – Rami A. Feb 15 '13 at 19:16