# Alternating error

**URL:** https://www.finalbuilder.com/forums/t/alternating-error/2089
**Category:** Discussion
**Created:** [March 7, 2013, 4:09am UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089 "2013-03-07T04:09:07Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![markholbrook](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/markholbrook/32/134_2.png) [@markholbrook](https://www.finalbuilder.com/forums/u/markholbrook)
#### Post date: [March 7, 2013, 4:09am UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089/1 "2013-03-07T04:09:07Z")

</div>

Hello,

We have TFS2010.&nbsp; I'm using the FinalBuilder workflow.&nbsp; We are building delphi projects so I've modified the TFSexample to make use of Delphi Compiler build.

I have most things working but just about ever other build fails with the error below.&nbsp; If I simply restart the build again it will likely succeed.&nbsp; I have 2169 installed right now.

Any ideas on what is going on?

&nbsp;

Create Label

Label ACSFBDevelopment\_20130306.13@$/AutostainerControlSoftware (version W16\_1\_dlb01vmusserv;DAKO\_USA\dlbuilder) was successfully created.

&nbsp;

00:04

FinalBuilder

00:04

FinalBuilderAnalyzing labels ACSFBDevelopment\_20130306.12 and ACSFBDevelopment\_20130306.13.

Exception encountered when running FinalBuilder: Value cannot be null. Parameter name: item at Microsoft.TeamFoundation.Common.TFCommonUtil.CheckStringForNullOrEmpty(String stringVar, String stringVarName, Boolean trim) at Microsoft.TeamFoundation.VersionControl.Client.Client.d\_\_7.MoveNext() at Microsoft.TeamFoundation.VersionControl.Client.Client.d\_\_0.MoveNext() at System.Linq.Enumerable.d\_\_b1`1.MoveNext() at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection) at VSoftTechnologies.FinalBuilder.TFS.Workflow.RunFinalBuilder.GetTriggerFileXML() at VSoftTechnologies.FinalBuilder.TFS.Workflow.RunFinalBuilder.GetTriggerFile() at VSoftTechnologies.FinalBuilder.TFS.Workflow.RunFinalBuilder.Execute(CodeActivityContext context)

![](https://www.finalbuilder.com/Support/Forums/afv/post/aff/Image1.gif)FinalBuilder project failed with error code 99. Please see the build log for details.

&nbsp;

&nbsp;

---

<div class="post-metadata">

### Author: ![markholbrook](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/markholbrook/32/134_2.png) [@markholbrook](https://www.finalbuilder.com/forums/u/markholbrook)
#### Post date: [March 7, 2013, 4:15am UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089/2 "2013-03-07T04:15:23Z")

</div>

I also get this error in my local VS (2012) it seems after queueing the build:   
  
 Error: Could not load file or assembly ‘file:///C:\Users\dev\AppData\Local\Temp\VSTFSBuild\d9342c19-e229-4cb8-9f46-114035858293\A1473076552\Microsoft.TeamFoundation.Build.Client.dll’ or one of its dependencies. The system cannot find the file specified.

---

<div class="post-metadata">

### Author: ![markholbrook](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/markholbrook/32/134_2.png) [@markholbrook](https://www.finalbuilder.com/forums/u/markholbrook)
#### Post date: [March 7, 2013, 4:41am UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089/3 "2013-03-07T04:41:05Z")

</div>

A bit more info on this issue… If I leave a previsou build in place I get the error. It seems to be comparing the label for the prior build to the current label and it gets the error:   
  
 Analyzing labels ACSFBDevelopment\_20130306.18 and ACSFBDevelopment\_20130306.19.   
  
 .18 was a successful build. I just left it in the list. I queued .19 and it failed with the error.   
  
 If I right click in VS and delete both .18 and .19 so no builds appear in the list then the next build I queue will succeed.   
  
 Any ideas?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 7, 2013, 11:29am UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089/4 "2013-03-07T11:29:36Z")

</div>

I’m not sure what is causing this issue, nothing has changed in this area in the last year. I have added a null check where I think the error is occuring (difficult to be sure from the stack trace), a tfs api which is supposed to be returning IEnumberable is perhaps returning null. The tfs doco is practically useless, so it’s hard to know if it is ever supposed to return null, but the general convention with IEnumerable is to return and empty collection, not null.   
  
 I’ll post here with another build later today.   
  
 As for the assembly load error, I have no idea, not much out there on google about this.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 7, 2013, 11:38am UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089/5 "2013-03-07T11:38:28Z")

</div>

> Posted By [MarkHolbrook](https://www.finalbuilder.com/User-Profile/userid/12585.aspx) on 06 Mar 2013 09:41 PM  
> A bit more info on this issue... If I leave a previsou build in place I get the error. It seems to be comparing the label for the prior build to the current label and it gets the error:   
>   
> Analyzing labels ACSFBDevelopment\_20130306.18 and ACSFBDevelopment\_20130306.19.   
>   
> .18 was a successful build. I just left it in the list. I queued .19 and it failed with the error.   
>   
> If I right click in VS and delete both .18 and .19 so no builds appear in the list then the next build I queue will succeed.   
>   
> Any ideas?

  

I'm trying to get my head around the code, the person who wrote it left last year and there are very few comments. From what I can tell, we find the most recent successful build from previous builds, and use the the date of that build to find changesets. The reason we do this is because the changesets passed in by TFS are not actually populated (the changes property is empty), so we get them by calling QueryHistory. If there are no previous builds then the we do not call queryhistory, that makes me think that I'm looking at the right general area. Unfortunately our test TFS 2010 install seems to be broken (TFS will not run), so it looks like I need to re-install TFS to test this.&nbsp;

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 8, 2013, 12:12pm UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089/6 "2013-03-08T12:12:35Z")

</div>

Hi Mark   
  
 Please try this build : [http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700\_2179.exe](http://downloads.finalbuilder.com/downloads/finalbuilder/700/FB700_2179.exe)

---

<div class="post-metadata">

### Author: ![markholbrook](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/markholbrook/32/134_2.png) [@markholbrook](https://www.finalbuilder.com/forums/u/markholbrook)
#### Post date: [March 8, 2013, 4:08am UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089/7 "2013-03-08T04:08:52Z")

</div>

Hi Vincent, well that seems to have fixed it. Not sure why but just having the new build of FB seems to allow me to create build after build just fine. Thanks.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [March 9, 2013, 12:37pm UTC](https://www.finalbuilder.com/forums/t/alternating-error/2089/8 "2013-03-09T12:37:31Z")

</div>

Hi Mark   
  
 Thanks for the feedback. That suggests that the queryhistory api does indeed return null instead of an empty IEnumerable.
