Ok, here's the thing:
I'm driving myself nuts trying to get the WARNINGS from a IBuildDetail object when invoking a CustomActivity.
This is what I've tried:
private static List<IBuildInformationNode> GetBuildWarnings(IBuildDetail buildInformation)
{
var warnings = buildInformation.Information.GetNodesByType(InformationTypes.BuildWarning);
if (warnings.Count == 0 && buildInformation.CompilationStatus == BuildPhaseStatus.Succeeded)
{
buildInformation.RefreshAllDetails();
warnings = buildInformation.Information.GetNodesByType(InformationTypes.BuildWarning);
}
return warnings;
}
That gives me 0 WARNINGS.
I've also tried the same code using :
var warnings = InformationNodeConverters.GetBuildWarnings(buildInformation);
which still brings no warnings.
This CustomActivity is invoked at the end of the Workflow: I actually don't have any issues retrieving the rest of the details like build status, build errors, test information, etc.
The issue is only with the Warnings.
Funny thing is that, at the end of the build, when I check the build results, there ARE warnings.
Any ideas?
Thanks in advance!
Is it possible that the warnings are happening after your custom activity is run. Can you examine the build log and see exactly where the warnings occur?