Search code examples
tfsmsbuildbuild-processtfsbuild

How can I collect name of dlls, which have already built during a running build.


I have TFS 2012 with Build Agent and Buld Controller. If I start a build, which is very time consuming, I would like to write to the log file the names of dlls that have been built (like build window). If a part of a build (dll) has failed, I would like to log the reason for the error too. I have an IBuildDetail object but I don't find the relevant properties.


Solution

  • The TFS Build kicks off the MSBuild tool to perform the actual compilation. By default TFS will capture the MSBuild log (which contains all the info about what was built, errors, warnings, etc). The MSBuild log is included in the Build Drop and linked from the TFS Build Summary and Details page.

    I don't think the IBuildDetail will have any of that information, aside from Build Warnings and Build Errors which should propagate to the TFS Build Info.

    Other than parsing the MSBuild log to extract the data you want, I don't think there's any other easier ways. What exactly are you trying to accomplish, maybe somebody can suggest a better approach?