While working with a client recently I came across an issue that I think needs to be better documented.
We were implementing Nuget packaging in their TFS 2012 build process. I knew from past engagements that the Nugetter project on CodePlex is an excellent way to easily add this activity to an existing build process.
We created the build definition using the NuGetterMultiPkgBuildVersionedTemplate20.xaml build process template. When we ran the build, it failed with the following error
TF215097: An error occurred while initializing a build for build definition
I’ve pasted the entire error message here so that it will be indexed by search engines and thus easier to find. :)
We did a little bit of searching online and followed a few dead-end trails. We finally tracked down a discussion article on the Nugetter project’s discussion page that pointed to a mismatched PowerShell version on the build controller.
While our build controller machine was running Windows Server 2008 R2, we found that it only had PowerShell v1.0 installed. We need to have PowerShell v3 installed for this to work.
We installed PowerShell v3 on the build controller and build agent and rebooted both machines. When we triggered the build again it ran to completion.
I’m not sure if the updated PowerShell was necessary for the Build Agent machine but the client decided to install it anyway.
If you encounter this error, make sure the Build Controller box has PowerShell v3 installed on it.