質問

In TFS 2012, I was able to use XAML based on this to customise our workflow to compare the number of warnings in the current build, to previous builds. (I have seen similar code elsewhere to check that code coverage has not gone down, etc).

In TFS 2013, there appears to be no way to retrieve results from previous builds as the BuildDetail type is no longer visible. Specifically, I got the following error:

The build process failed validation. Details: Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "Microsoft.TeamFoundation.Build.Client.InformationNodeConverters.GetBuildWarnings(BuildDetail).Count". 'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'. Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "BuildDetail.BuildServer.GetBuild(BuildDetail.BuildDefinition.LastGoodBuildUri)". 'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'. 'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'. 

Is there any way, in TFS 2013, to access details of previous builds, that BuildDetail.BuildServer.GetBuild provided in TFS 2012? I cannot find any samples on the web that aren't using the old method.

役に立ちましたか?

解決 2

After further investigation, it turns out that the TFS Build Extensions provide a GetLastGoodBuild activity, which appears to do what I need.

他のヒント

The TFS Product Team have dramatically simplified the build as 90% of people out there either do not customise or want some simple customisation that can be done in PowerShell. If you want to have BuildDetail you can get it by using the "GetBuildDetail" activity that is included in the build.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top