144
votes

I can find the shelve button okay, and had shelved changes earlier today, but now I can't seem to find a way to unshelve them! This has left me in quite a predicament!

If this button is in fact missing in the Visual Studio 11 Beta, perhaps there is a console based TFS command I can execute to temporarily accomplish this?

Thanks all, I actually can't find an answer on Google for this either.

5
tf.exe is the command line client, and can do anything the IDE can (and more).AakashM
Yes: took under 10s starting from Pending Changes tab (and knowing that a highlighted text with a download leads to more options).Richard
Oh I see, it's under "Find Shelvesets". I suppose because I'm looking for the word "Unshelve" that menu item got bypassed in my brain automatically :) Thanks.GONeale

5 Answers

228
votes

Go to Team Explorer, then "Pending Changes", then "Actions", then "Find Shelvesets", then right click on the shelve you want to unshelve, finally "Unshelve".

32
votes

Also :

File > Source Control > Find > Find Shelvesets
10
votes

I always used to right-click on the solution and choose "Unshelve". To add this functionality back:

  1. Click on the menu "Tools > Customize". This opens the "Customize" dialog.
  2. Select the "Commands" tab.
  3. Choose the "Context menu" radio button in the "Choose a menu or toolbar to rearrange" section.
  4. Choose "Project and Solution Context Menus | Solution | Source Control" from the drop down.
  5. Click the "Add Command" button. This opens the "Add Command" dialog.
  6. Choose "File" in the "Categories" list.
  7. Choose "TfsUnshelvePendingChanges" in the "Commands" list.
  8. Click the "OK" button to close the "Add Command" dialog.
  9. Use the "Move Down" button to place the new menu item in the proper place.
  10. Click the "Close" button to close the "Customize" dialog.
4
votes

Generally if you can't find an option among the thousands available in Visual Studio there is a very useful "Quick Launch" (Ctrl-Q) function. In this case if you type "shelve" it will show you where to find shelvesets.

2
votes

Just like to add to Nock's answer that you can only see the unshelve option if you open a solution under source control.

You will not see the option if you open a blank solution, regardless if your Visual Studio workspace is connected to Team Foundation or not.

This is how it looks like if you tried unshelving a shelveset in a blank solution (with TFS connected to your Visual Studio workspace and source control all connected), where there isn't an option to unshelve from source control.

Blank Solution with TFS Connected

This is how it looks like with a solution under source control opened.

Unshelve option

Moral of the answer is to open any solution/project you may have that is under the source control which has the shelveset you want to unshelve.