R – TFS 2008 Continuous integration MSBUILD on Branch fails on Label

continuous integrationmsbuildtfs

I am attempting to use CI on a Branch of one of my TFS projects. MSBuild only fails when I try to use a Branch. I point the same Build at the "trunk" project it works fine.

The error I receive from the build log:

Task "Label"

Label TeamFoundationServerUrl="http://TFSServer:8080/"
BuildUri="vstfs:///Build/Build/6763"
Name="Test_SF_20090619.1"
Scope="$/MyProject" Recursive=True
Comments="Label created by Team Build"
Version="BuildServer3D143_66"
Child="Replace" Files="$/" C:\Program
Files\MSBuild\Microsoft\VisualStudio\TeamBuild\Microsoft.TeamFoundation.Build.targets(812,5,812,5):

error : No matching items found in $/
in your workspace.

Done executing task "Label" — FAILED.

Done building target "CoreLabel" in project
"TFSBuild.proj" — FAILED.

I believe this error is being caused by a lack of source files getting copied to the Build server.

Get task excerpt from build log:

Task "Get"

Get TeamFoundationServerUrl="http://TFSServer:8080/"
BuildUri="vstfs:///Build/Build/6768"
Force=True Overwrite=False
PopulateOutput=False Preview=False
Recursive=True Version="C204806"
Workspace="BuildServer3D143_66"

Done executing task "Get".

This is a full build. There should be about a thousand files listed in the GET.

General Information

  • TFS 2008
  • Visual Studio 2008
  • Established build server (been
    running builds for the last year)
  • Project being branched is a ASP.NET
    web stie (2.0 Framework).

Full Build Params

  • /p:SkipClean=false
  • /p:SkipInitializeWorkspace=false
  • /p:ForceGet=true
  • /p:IncrementalBuild=false
  • /p:IncrementalGet=false

note: I know IncrementalBuild is redundent but I just wanted to be sure.

Questions:

  • Are there restrictions on builds off a branch?
  • Any idea why MSBuild fails to pull files from the branch workspace?

Best Answer

If it's for CI then you're most likely doing an Incremental Get. TFS will only bother to get files it thinks have changed since its last get - e.g. if you delete any files from your server, it will still think you have those files so it won't get them again. In this case you'll need to run the build once with the incremental properties turned off so that it forces a full get of the source. You can do this by overriding the properties in the MSBuild command line box in the Queue Build dialog with:

/p:IncrementalGet=false;ForceGet=true

Another possibility that springs to mind is that the Label task is confused by your branch. It may be that your workspace is set up incorrectly, so check that you're mapping in everything it needs.