BuildIt tool: How can I get a build error description?

  • Thread starter Thread starter Eric Chong
  • Start date Start date
E

Eric Chong

I have been trying to automate our builds using BuildIt
tool available from Microsoft. This tool only log whether
build is success or fail. Since all developers would like
to see what the build error descriptions are, I need to
add it to the source code. However, SolutionBuild object
don't have that property available. Is it even possible to
get that information? What should I do in order to get an
error description?
Thanks in advance.

Eric
 
Hi Eric,

right after the lines in the BuildSolutionConfig

while(solutionBuild.BuildState != vsBuildState.vsBuildStateDone);

where we wait for the build to finish. You can grab the output from the
output pane. Here is a quick macro that you can translate into C#.
Sub BuildWindowText()
Dim outputWin As OutputWindow
Dim outputWinPane As OutputWindowPane
Dim outputWinPaneTxtDoc As TextDocument
outputWin =
DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput).Object
outputWinPane =
outputWin.OutputWindowPanes.Item("{1BD8A850-02D1-11D1-BEE7-00A0C913D1F8}")
outputWinPaneTxtDoc = outputWinPane.TextDocument

MsgBox(outputWinPaneTxtDoc.StartPoint.CreateEditPoint().GetText(outputWinPan
eTxtDoc.EndPoint))
End Sub

Instead of a msgbox, you can look at some other reporting mechanism.

I hope that helps.

Thanks!
Mike Wong
Microsoft Developer Support
--------------------
 
Back
Top