I am trying to use a personalized workflow to automatically create assembly numbers based on a previously completed assembly. This method worked with the MSBuild-based “workflow”, but I cannot get TFS to report the correct “last good build” for the current build definition.
What I'm doing is pretty simple:
IBuildDetail build = context.GetExtension<IBuildDetail>();
IBuildDetail last = build.BuildServer.GetBuild(build.BuildDefinition.LastGoodBuildUri);
I have already launched a successful build in which the activity of my code was forced to have the build number BuildName_1.0.0.0. But when I try to get this assembly and extract the version number, it GetBuildcomplains that LastGoodBuildUriit is null.
The custom assembly template that I use at the end installs both CompilationStatus, and TestStatusin BuildPhaseStatus.Succeeded, so TFS should be able to say that this is a good assembly. What else am I missing?
source
share