index > Team Foundation Server - Build Automation > "Unable to determine the workspace" error duing label o...

"Unable to determine the workspace" error duing label o...


Our Team Builds are failing with the following error:

--------------------------------------------------------------------
Target CoreLabel:
Label Name="Daily Build_20060707.3" Recursive=True Version="WPROJECTBUILD2_NAM - Energy Partnership_Daily Build" Child="replace" Workspace="PROJECTBUILD2_NAM - Energy Partnership_Daily Build" Files="$/NAM - Energy Partnership"
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error : Error: Unable to determine the workspace.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error MSB4018: The "Label" task failed unexpectedly.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error MSB4018: System.ArgumentException: Error: Unable to determine the workspace.
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error MSB4018: at Microsoft.TeamFoundation.Build.Tasks.VersionControlTask.GetCurrentWorkspace()
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error MSB4018: at Microsoft.TeamFoundation.Build.Tasks.VersionControlTask.GetRepositoryUrl(String fileName, String workspaceName, String workspaceOwner)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error MSB4018: at Microsoft.TeamFoundation.Build.Tasks.VersionControlTask.GetWorkspaceInfo(ITaskItem[] fileSpecs, String& repositoryUrl, String& workspaceName, String& workspaceOwner)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error MSB4018: at Microsoft.TeamFoundation.Build.Tasks.VersionControlTask.GetWorkspaceInfoOrRepositoryUrl(ITaskItem[] fileSpecs, String& repositoryUrl, String& workspaceName, String& workspaceOwner)
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error MSB4018: at Microsoft.TeamFoundation.Build.Tasks.Label.Execute()
C:\Program Files\MSBuild\Microsoft\VisualStudio\v8.0\TeamBuild\Microsoft.TeamFoundation.Build.targets(348,5): error MSB4018: at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
-----------------------------------------------------------------------------

I'm wondering if anyone has seen this, and if so, what the resolution is.

The "Get" operation appears to be working just fine, it is just the label operation that is failing.




Jim Conigliaro
Jim Conigliaro

The task will try to determine the workspace based on the Workspace property, the Files property, and the current directory, in that order. The Files property is a server path, and the command is being run from an unmapped directory, so neither of those helps.

The workspace should have been determined by the Workspace property, which is "PROJECTBUILD2_NAM - Energy Partnership_Daily Build" in this case. The likely problem is that the workspace doesn't exist and doesn't match the workspace used by the Get task.

Label Name="Daily Build_20060707.3" Recursive=True Version="WPROJECTBUILD2_NAM - Energy Partnership_Daily Build" Child="replace" Workspace="PROJECTBUILD2_NAM - Energy Partnership_Daily Build" Files="$/NAM - Energy Partnership"

Does the log file say which workspace the Get task used?

Buck




http://blogs.msdn.com/buckh
Buck Hodges

That's what's killing me. The log indicates that the create workspace completes and that the Get task is working just fine:

-----------------------------------------------
Target InitializeWorkspace:

DeleteWorkspaceTask Name="PROJECTBUILD2_NAM - Energy Partnership_Daily Build" TeamFoundationServerUrl=http://source:8080/
CreateWorkspaceTask Name="PROJECTBUILD2_NAM - Energy Partnership_Daily Build" TeamFoundationServerUrl="http://source:8080/" MappingFile="WorkspaceMapping.xml" LocalPath="C:\AutomatedBuilds\NAM\Energy Partnership\NAM - Energy Partnership\Daily Build\BuildType\..\Sources" TeamProject="NAM - Energy Partnership"

Target CoreGet:
Get Version="T" Recursive=True Force=True Workspace="PROJECTBUILD2_NAM - Energy Partnership_Daily Build"
Getting C:\AutomatedBuilds\NAM\Energy Partnership\NAM - Energy Partnership\Daily Build\Sources
Getting C:\AutomatedBuilds\NAM\Energy Partnership\NAM - Energy Partnership\Daily Build\Sources\Source Code
Getting C:\AutomatedBuilds\NAM\Energy Partnership\NAM - Energy Partnership\Daily Build\Sources\TeamBuildTypes
...
------------------------------------------------------------




Jim Conigliaro
Jim Conigliaro

If you specify a local path for the files to label, does it work?

Buck




http://blogs.msdn.com/buckh
Buck Hodges

Jim,

Were you able to determine what this problem is? I have the same issue. If I run the build on another machine, it works just fine.

Thanks

Paul Stefancyk
reply 5

You can use google to search for other answers

 

More Articles

Different size DLLs when building on the server vs Laptop VS buil...
Running diff. test lists under diff. testconfigs?
Nickname for a Build?
More Continuous Integration problems
Problems with run test coverage analisys on Build Machine
help link - nightly builds
team build (msbuild) question
TeamBuild Fails when building Solution with EntLib 2.0 projects.
Stopping Build After First Error For Desktop Builds
Build Report
Welcome to Bokebb   New Update   Joins the collection  
 

New Articles

Team Build with Multiple Projects fails …
How to prevent build create work items?
RTM: Using MSBUILD in batch file Build a…
warning MSB3245
running unit tests causing build to fail
Build failing - write permission problem.
help link - nightly builds
How to publish (clickonce) a solution
Microsoft.WebApplication.targets project…
how to select which source to pull down …
AssemblyInfo MSBuil task
Found in and Integrated in fields valid …
Building with multiple projects in diffe…
TestResults Drop
Unit test failures

Hot Articles

Debuger fails when trying to debug on th…
Data build
Filtering Associated Work Items
Can I build on a virtual machine?
How to pass parameters from Team Build t…
Build with tests fails with no indicatio…
Displaying Code coverage results with au…
To Get the Labeled Version
Revert bach check in after build fail
Overriding a custom property in csproj f…
How to create a master build?
Team Build not setting "Integration…
Reference in Testproject
Build fails with: The binary form of an …
Team Build, TestConfiguration and Deploy…

Recommend Articles

Build on a few solutions under different…
Print build summary?
Team Build --- Run build and items built…
automated unit tests
Build doesnt compile/ publish web servic…
protecting the team build machines over …
How to do strong name signing and digita…
copy files
newbie in build automation.
How do I run new UnitTests automatically?
Team Build Test Config Deployment Issue
Property for CoreDropBuild target
Build number for tasks and changesets.
Build for setup project failing
Can not run tests on build server