1
votes

I'm having an issue implementing a custom build definition. I've tried most of the solutions I've found online, but no luck here. The spot I'm currently stuck at seems to be with this line of code, where I can't seem to win.

xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"

This creates the messy error

TF215097: An error occurred while initializing a build for build definition \LeanTesterSoftware\TSS_src1.0_test: 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 "DropBuild AndAlso BuildDetail.Reason = Microsoft.TeamFoundation.Build.Client.BuildReason.ValidateShelveset". 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.DropLocation". 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 "PrivateDropLocation + "\" + BuildDetail.BuildDefinition.Name + "\" + BuildDetail.BuildNumber". Type 'IBuildDetail' is not defined. 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 "DropBuild AndAlso (BuildDetail.Reason And Microsoft.TeamFoundation.Build.Client.BuildReason.Triggered) = BuildDetail.Reason". Type 'IBuildDetail' is not defined. 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.DropLocation". 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.DropLocationRoot + "\" + BuildDetail.BuildDefinition.Name + "\" + BuildDetail.BuildNumber". Type 'IBuildDetail' is not defined. Type 'IBuildDetail' is not defined. 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.IsNullOrEmpty(BuildDetail.DropLocationRoot)". 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 "New Microsoft.TeamFoundation.Build.Workflow.Activities.EmptyDropLocationRootException(BuildDetail.BuildDefinition.Name)". Type 'IBuildDetail' is not defined.

But if I remove the versioning:

 xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client"

I get

TF215097: An error occurred while initializing a build for build definition \LeanTesterSoftware\TSS_src1.0_test: 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". Option Strict On disallows implicit conversions from 'Microsoft.TeamFoundation.Build.Client.IBuildDetail' to 'Microsoft.TeamFoundation.Build.Client.IBuildDetail'.

Any thoughts?

EDIT: The build machine is running TFS2010, VS2012, VS2010 and VS2005.

1

1 Answers

0
votes

Not exactly answering the question here, but after a couple of days playing with this, here is what I've gotten.

Visual Studio + TFS Build definitions don't mix very well. VS adds a lot of extra code and things can get messy. To avoid this, here is what I've gathered:

-There is a lot of conflicting (in other words 100% opposite) claims across the net. You can try playing with those and you'll be able to make some progress.

-What may work out to be the best is to start with two default build templates --Edit one via VS. Throw in your custom activity, open up the codeview and find the changes (dependencies, plus the actual call). --Manually implement those changes in your second version, ommitting anything to do with SAP2010, etc.

Best of luck to anyone else working through this!