Frage

I'm writing a customized activity for TFS build process workflow, e.g. guideline here.

In my C# CodeActivity .Execute() method, I want to output my text to the TFS build 's summary information as the snapshot below.

How can I do that?

enter image description here

War es hilfreich?

Lösung

You should to use the CustomSummaryInformation object to display the summary message. Here is the code. Hope it helps.

 protected override void Execute(CodeActivityContext context)
 {
    var summaryReport = new CustomSummaryInformation()
    {
    Message = "Your message",
    SectionPriority = 0,
    SectionHeader = "Header Name",
    SectionName = "Section Name",
    };
    context.Track(summaryReport);
}
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top