47

I am using TFS 2012. In TFS there are more than 15 users. When I try to unshelve a shelveset files it shows error as shown below

enter image description here

Interesting is that this error does not comes for few users, and they are able to unshelve it. All the users have same permission. The error comes for one user and for another user it does not come in same PC(TFS server installed PC).So it's little strange error. Initially i was thinking like may be a problem with mappings,but for another user same kind of mapping allows to unshelve it. I also tried re creating the user and it does not solve the problem. So why does this error comes?

IT researcher
  • 3,274
  • 17
  • 79
  • 143

3 Answers3

91

Check the workspace you have selected in Team Explorer > Pending Changes. You must have a workspace selected that has a mapping which includes the server path of the file you are trying to unshelve.

(Note: make sure you are using the workspace mapping in Team Explorer, NOT the workspace shown in Source Control Explorer.)

Pending Changes

So if the file on shelveset is: $/TFS/Main/File1.cs, you need to have a workspace selected with a mapping that includes that file or one of its parent folders (e.g. $/TFS/Main)

I have multiple workspace for different branches and usually see this error when I try to unshelve into "Main" workspace when my "Feature Branch" workspace is selected.

HaveSpacesuit
  • 3,572
  • 6
  • 40
  • 59
DaveShaw
  • 52,123
  • 16
  • 112
  • 141
  • I have created a new workspace for the folder containing the file, and then tried to unshelve(i.e i have created workspace for folder containing file which is in shelveset).But error comes. For the same mapping it worked in another user. – IT researcher Apr 24 '14 at 09:27
  • Do you have the Workspace selected, I'll add an image now. – DaveShaw Apr 24 '14 at 09:34
  • 2
    Hey I didn't observe the workspace name which is present in team explorer. I was looking at workspace name in the source control explorer. Every time I was opening workspace to which unshelve need to be done. Now I got how exactly i got error and how to unshelve a shelveset by selecting workspace. – IT researcher Apr 26 '14 at 11:04
  • 2
    VS2012 - Team Explorer - Pending Changes: Right about the 'Check in' button is the workspace. Select the workspace before unshelving. – AMissico Nov 18 '14 at 00:00
  • Wow, how obscure is it that your workspace selected in Pending Changes is not the same workspace selected under Source Control Explorer? Thank you – brsfan Sep 19 '19 at 19:47
  • @brsfan I agree. You have to know what workspace is selected in your pending changes tab to know which ws you're going to unshelve in. Talking about bad user experience! – Danny van der Kraan Mar 02 '21 at 08:26
20

You need to select your Workspace in Team Explorer, not in Source Control Explorer.

To avoid this try to create you mapping with the same path across different workspaces.

Right way :

enter image description here

Wrong way :

enter image description here

Roberto Borges
  • 683
  • 1
  • 5
  • 14
2

This error happens when your shelveset has file(s) or folder(s), which are not mapped in your local workspace. Please do a forced get latest for all paths contained in shelvesets. Unshelving will work after that.

Hamid Shahid
  • 4,486
  • 3
  • 32
  • 41
  • In my case i have frmmain.frm inside $/coding_files/Testing_coding and i created workspace for $/coding_files/Testing_coding. Then created shelve set. Created new workspace for same and while doing unshelve got the error. – IT researcher Apr 25 '14 at 06:21
  • 2
    How do you do a 'forced get'? – Neil Nov 17 '16 at 09:51