I cannot seem to get my customized build to work.

Sep 17, 2012 at 3:57 PM

I followed the instructions to add the StyleCop activity to a build that already works.

I put the assemblies in a folder below the BuildProcessTemplates folder, as suggested.

Now, when I try to run the previously working build using the modified template, I consistently get these errors:

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 "BuildDetail.BuildNumber".Type 'IBuildDetail' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "BuildDetail.BuildNumber".Type 'IBuildDetail' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "BuildDetail.BuildDefinition.Name".Type 'IBuildDetail' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "associatedChangesets".Type 'Changeset' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "associatedChangesets".Type 'Changeset' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "treatTestFailureAsBuildFailure And (BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed)".Type 'IBuildDetail' is not defined.'Client' is not a member of 'Build'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown".Type 'IBuildDetail' is not defined.'Client' is not a member of 'Build'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown".Type 'IBuildDetail' is not defined.'Client' is not a member of 'Build'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "failedRequests".Type 'IQueuedBuild' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "failedRequests".Type 'IQueuedBuild' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "testAssemblies.Count() > 0".'Count' is not a member of 'System.Collections.Generic.IEnumerable(Of String)'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "agileTestPlatformAssemblies.Count() > 0".'Count' is not a member of 'System.Collections.Generic.IEnumerable(Of String)'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "failedRequests".Type 'IQueuedBuild' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "failedRequests".Type 'IQueuedBuild' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "BuildDetail.RequestedFor".Type 'IBuildDetail' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "String.Format("Build Failure in Build: {0}", BuildDetail.BuildNumber)".Type 'IBuildDetail' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "StyleCopFiles.ToArray()".'ToArray' is not a member of 'System.Collections.Generic.IEnumerable(Of String)'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "String.Format("{0}@$/{1}", LabelName, BuildDetail.BuildDefinition.TeamProject)".Type 'IBuildDetail' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "String.Format("$/{0}", BuildDetail.BuildDefinition.TeamProject)".Type 'IBuildDetail' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "failedRequests".Type 'IQueuedBuild' is not defined.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "WorkspaceName.Length > Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize".'VersionControl' is not a member of 'TeamFoundation'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "WorkspaceName.Substring(0, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize).TrimEnd()".'VersionControl' is not a member of 'TeamFoundation'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "String.Format("The workspace name '{0}' exceeds the maximum allowed limit of '{1}' characters. Truncating it to match the maximum limit.", WorkspaceName, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize)".'VersionControl' is not a member of 'TeamFoundation'.
Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error:   Compiler error(s) encountered processing expression "String.Format("{0}_{1}_{2}", BuildDetail.BuildDefinition.Id, Microsoft.TeamFoundation.LinkingUtilities.DecodeUri(BuildAgent.Uri.AbsoluteUri).ToolSpecificId, BuildAgent.ServiceHost.Name)".Type 'IBuildDetail' is not defined.'LinkingUtilities' is not a member of 'TeamFoundation'.Type 'IBuildAgent' is not defined.Type 'IBuildAgent' is not defined.

Can anyone give me a clue what I've done wrong?

Thanks, Simon

Oct 9, 2012 at 10:39 PM

Figured out the problem.  For what it's worth.  The IBuildAgent interface was not defined because I had TFServer 2012RC installed on the Build Agent box.  All the other components in the Build chain had been upgraded to TFS2012 RTM. 

My fault.  Sorry to bother you guys with this.