TFS 2012 build error The "CreateWorkspaceTask" task did not receive a value for the required parameter "BuildAgentUri",

We upgraded to TFS 2012 and modified our deprecated build templates to remove all strong name references in the Microsoft.TeamFoundation namespaces from the Activity element. When creating, we get the following error:

C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ TeamBuild \ Microsoft.TeamFoundation.Build.targets (801): Task "CreateWorkspaceTask" did not receive a value for the required parameter "BuildAgentUri".

Has anyone else encountered this error?

+7
source share
2 answers

I just solved this problem earlier today.

Go and open: -

C: \ Program Files (x86) \ MSBuild \ Microsoft \ VisualStudio \ TeamBuild \ Microsoft.TeamFoundation.Build.targets

Find a section similar to the following: -

CreateWorkspaceTask TeamFoundationServerUrl = "$ (TeamFoundationServerUrl)" BuildUri = "$ (BuildUri)" BuildDirectory = "$ (BuildDirectory)" SourcesDirectory = "$ (SolutionRoot)" Name = "$ (WorkspaceName)" Comment = "$ (CreateWorkspaceTaskmentment

Replace it: -

<!-- Create the workspace for this build --> <CreateWorkspaceTask TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" BuildDirectory="$(BuildDirectory)" SourcesDirectory="$(SolutionRoot)" Name="$(WorkspaceName)" Comment="$(CreateWorkspaceTaskComment)" Condition=" '$(ProjectFileVersion)' != '4'"> <Output TaskParameter="Name" PropertyName="WorkspaceName" /> <Output TaskParameter="Owner" PropertyName="WorkspaceOwner" /> </CreateWorkspaceTask> <CreateWorkspaceTask TeamFoundationServerUrl="$(TeamFoundationServerUrl)" BuildUri="$(BuildUri)" BuildDirectory="$(BuildDirectory)" BuildAgentUri="$(BuildAgentUri)" SourcesDirectory="$(SolutionRoot)" Name="$(WorkspaceName)" Comment="$(CreateWorkspaceTaskComment)" Condition=" '$(ProjectFileVersion)' == '4'"> <Output TaskParameter="Name" PropertyName="WorkspaceName" /> <Output TaskParameter="Owner" PropertyName="WorkspaceOwner" /> </CreateWorkspaceTask> 

Pay particular attention to the text cover, as this is an XML document ...

Please let me know if this helps ...

Hooray!

... Chev

+12
source

We encountered this problem on one of our assembly machines. The construction machine was working fine one day and stopped. The only change was to complete the installation of Visual Studio 2010 Service Pack 1.

We suggested that MSBuild might have rolled over to the previous version.

So, we looked at this file on another build machine, and this section looked exactly like the one provided by Chevpp.

So, we went into the “programs and features” on the build machine and performed repairs on the TFS 2012 installation. This updated the Microsoft.TeamFoundation.Build.targets file to look like the fragment provided by Chev.

Now assemblies start correctly again.

+6
source

All Articles