I am using Visual Studio 2010, TFS 2010 and FinalBuilder 6.3.0.2026
When I run a TFS Team build, which include a FinalBuilder project, I receive the following error:
error : Failed to initialise Team Foundation server connection : An item with the same key has already been added.I receive this error before the actions in the FinalBuilder project are executed.
Are there any known problems with using Finalbuilder 6 with TFS2010?
Having a quick look around on the web it seems like your error can be caused by the TFS cache becoming corrupted or out of date. There's more information (including scripts to clean the cache) here and here.
With TFS2010 Microsoft have changed the build engine from MSBuild to Workflow Foundation. As a result, the VS.NET addin provided with FinalBuilder 6 does not work with TFS2010 and, for now, you cannot create new builds that use FinalBuilder. I'm currently working on a TFS2010 workflow element that will be part of FinalBuilder 7.
Because there is no native support for TFS2010 in FinalBuilder 6, I assume that you've upgraded from TFS2008? If cleaning the cache doesn't work please let me know how you created the TFS build and I'll try and reproduce the error.
We are also getting this error, but we are using VS2008 connected to TFS 2010 and FinalBuilder 6.3.0.2172.
You have mentioned that you where working on a fix for FinalBuilder 7, I have installed FB 7.0.0.787, but there does not seem to be any way that I can see to convert our existing TFS builds to use the new FB 7 projects. Also when I try and create a new Build project it will always try and create a FB 6 project rather than a FB 7 project. Therefore I am unable to find a way of making our builds work
Any help on this would be most gratefully appreciated.
Hi Sean, Please see this article on how to integrate TFS2010 and FinalBuilder: https://www.finalbuilder.com/articles.aspx?ID=38, which will hopefully answer you questions. If not, please let me know.
Thanks for the article, that will help when we upgrade to Visual Studio 2010, but unfortunately we are still using Visual Studio 2008 on the build machine so that does not sort our problem out. We have only migrated the Server to TFS 2010. The projects etc. are still in Visual Studio 2008 and are likely to stay that way for a while yet.
We have installed the forward compatibility update for VS2008 as we can see the server from the PC. We did try cleaning the TFS cache. The error message we are getting is:
C:\Documents and Settings\buildman\Local Settings\Temp\Symphony\Symphony Continuous\BuildType\TFSBuild.proj(222,5): error : Failed to initialise Team Foundation server connection : An item with the same key has already been added.
We get this for all of our continuous builds that we are running from Visual Studio. If I run the FB project directly populating the TFS Build variables manually before hand the build works fine.
The ‘build amchine’ is a machine that is running the TFS build agents has VS2008 installed on it, with the forward compatability installed.
Hi again Sean, So far I can’t reproduce the error you’re seeing. Here’s my setup: - TFS Server/Controller: TFS2010 + FinalBuilder 7 - Build agent: TFS2010 build service + VS2008 SP1 + Team Explorer 2008 + FCU + FinalBuilder7
I created a new build definition in Team Explorer 2010, using FinalBuilderBuild.xaml, and successfully ran it on the build machine. I could successfully trigger the build from both Team Explorer 2008 and 2010.
Just to clarify, have you created a new build definition for building with TFS2010? Unfortunately because of the massive change between TFS2008 and 2010 its possible that existing FinalBuilder build definitions won’t be properly upgraded when via the TFS server upgrade process.
Sorry for the delay in getting back, but we have been trying to get a patch release of our software out to a client.
I have now tried creating a new build definition in Team Explorer 2010 using FinalBuilder.xaml. When I try and run the build from Visual Studio I get a "Object reference not set to an instance of an object." error. The project runs fine if I run it directly from FinalBuilder 7.
I have done a build with the diagnostic verbose set and attached the resulting log file.
I am at a loss to what object the error is refering to.
Hi Sean, At least we’re at the stage where FinalBuilder is running. Slow progress, but progress I guess.
Are you using the ‘default working folder’ option in the TFS Get action? FinalBuilder options are per-user: my suspicion is that you’ve set the default working folder when logged in as a user other than the user the one TFS uses to run the build. There’s two ways around this:
1. log in as the user TFS uses, launch FinalBuilder, set the default working directory 2. set the working folder explicitly in the action. If you need to use this in multiple actions, you can use a project variable.
Out of interest, why are you using FB to do your TFS get, rather than the TFS build process? Usually it makes more sense to tell TFS which workspaces to get in the build definition, so it does it when its setting up the build agent.
I have altered the build process to not use the Get, but allow TFS to do this. The project I am using is a fairly basic one that gets the latest version of our documentation and then copies it to certain locations so that other members of the team can then use it. Therefore there is no project to actually build. If I leave the Projects to Build blank in the Process I get the following error from FinalBuilder
Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index
If I add a project and include it in the Workspaces, then the FinalBuilder project does work.
Hi Sean, Glad you’re up and running. For info, you should be able to specify any file in TFS as the project to build - it doesn’t have to be a .sln. That way there’s no need to create a dummy project.