1

Closed

<TfsSource TaskAction="Checkout" ... /> sometimes produces error : Exit Code 100. Nothing Succeeded: Unable to determine the workspace.

description

Hi.

Thank you for MSBuild Extension Pack 4.0.6.0 (October 2012).

I've run into this error twice already and I'm wondering how I can provide more diagnostic information because it only happens sometimes (randomly).

<TfsSource Version="2010" TaskAction="Checkout" ItemPath=".\Solution1\Project1\Properties\AssemblyInfo.cs" WorkingDirectory="$(MSBuildProjectDirectory)" />

From the TFS 2010 diagnostic build log:

Using "TfsSource" task from assembly "C:\Builds\9\Sources\Third Party\Microsoft\MsBuild Extension Pack\October 2012\MSBuild Extension Pack 4.0.6.0 Binaries\MSBuild.ExtensionPack.dll".
Task "TfsSource" (TaskId:5637)
Resolve TF.exe path (TaskId:5637)
TF.exe path resolved to: c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools..\IDE\tf.exe (TaskId:5637)
TF Operation: Checkout (TaskId:5637)
Executing c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools..\IDE\tf.exe checkout ".\Solution1\Project1\Properties\AssemblyInfo.cs" /noprompt /recursive (TaskId:5637)
(TaskId:5637)
C:\Builds\9\Sources\build.proj(1108,5): error : Exit Code 100. Nothing Succeeded: Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'.
Done executing task "TfsSource" -- FAILED. (TaskId:5637)

The build definition uses DefaultTemplate.xml and doesn't do anything special with the workspace.

Re-running the build will resolve the issue.

Thank you.
Closed Aug 23, 2013 at 7:28 AM by mikeFourie
Closing as no-repro for now :-(

comments

wrote Apr 19, 2013 at 10:48 AM

Associated with changeset 83419: VisualStudio\TFSource.cs, TFSSourceAdmin.cs: Add additional logging.

mikeFourie wrote Apr 19, 2013 at 11:18 AM

so you're calling out to msbuild from your xaml def? There is a library of activities here which you may find useful: https://tfsbuildextensions.codeplex.com/

in this case im not sure what is happening. I jsut checked in an update to increase logging so we can see where exactly its being run from.

As a side concern, you are doing version control operations during your build which is not worth the stress. I've got an old blog post here on this: http://mikefourie.wordpress.com/2009/11/07/versioning-code-in-tfs-revised/

Let me know if the can try the updated code and run a build with diagnostic logging.

Cheers

Mike

icnocop wrote Jun 15, 2013 at 12:52 AM

Thank you, Mike.

It took a while to reproduce this issue with the latest binaries (April 2013, v4.0.7.0).
Using "TfsSource" task from assembly "C:\Builds\6\Sources\Third Party\Microsoft\MsBuild Extension Pack\April 2013\MSBuild Extension Pack 4.0.7.0 Binaries\MSBuild.ExtensionPack.dll".
Task "TfsSource" (TaskId:5902)
  Resolve TF.exe path (TaskId:5902)
  TF.exe path resolved to: c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\..\IDE\tf.exe (TaskId:5902)
  TF Operation: Checkout (TaskId:5902)
  WorkingDirectory set to: C:\Builds\6\Sources (TaskId:5902)
  Executing c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Tools\..\IDE\tf.exe checkout ".\Solution1\Project1\Project.build.number"  /noprompt /recursive (TaskId:5902)
   (TaskId:5902)
C:\Builds\6\Sources\build.proj(1150,5): error : Exit Code 100. Nothing Succeeded: Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'.
Done executing task "TfsSource" -- FAILED. (TaskId:5902)
The additional log entry shows the expected working directory so I am not sure what else is really going on that would cause this error.
:(

mikeFourie wrote Aug 22, 2013 at 6:06 PM

Does this happen randomly or all the time?

icnocop wrote Aug 22, 2013 at 10:33 PM

It still only happens sometimes \ randomly.

I don't think it has anything to do with MSBuild Extension pack though.

Thank you.