Is there a way to compare 2 shelves in TFS without having to resort to unshelving both in separate workspaces and diffing the files?
-
1Could you please mention which method worked and how exactly? Thanks! – Charles Prakash Dasari May 03 '10 at 17:43
-
I went with tfpt review in the end. – koregan May 04 '10 at 19:00
-
1but as Ian Goldby's comment on the accepted answer states, this doesn't compare the shelveset with the local copy, but the shelveset and the original version/the latest version...? – codeling Jan 07 '13 at 09:21
3 Answers
I was looking for the same i.e. to compare the contents of two shelveets without needing to unshelve one of them. End up writing a Visual Studio extension for the functionality.
The extension is available for Visual studio 2013
http://visualstudiogallery.msdn.microsoft.com/1fa59764-efc6-457a-a5f3-81ca68e280e8
and for Visual studio 2012
http://visualstudiogallery.msdn.microsoft.com/33c521d4-73fc-48be-969d-fa68c511341f
Please feel free to use and give your feedback.

- 4,486
- 3
- 32
- 41
-
2
-
-
@HolisticDeveloper There is a version available now for Visual Studio 2015. There were bugs reported so I had to take it offline to fix them. – Hamid Shahid Jan 16 '17 at 23:56
-
-
1There is a VS2015 version available https://marketplace.visualstudio.com/items?itemName=HamidShahid.ShelvesetComparer – Hamid Shahid Apr 11 '17 at 12:48
-
-
4The Visual Studio 2017 version of shelveset comparer extension is now available https://marketplace.visualstudio.com/items?itemName=HamidShahid.ShelvesetComparer-19329 – Hamid Shahid Sep 22 '17 at 01:18
-
-
2Found @Hamid DiffFinder for VS2022 https://marketplace.visualstudio.com/items?itemName=dprZoft.DiffFinder-VS2022, successor to ShelvesetComparer. Did exactly what I needed it for. Thanks! – JonathanN Feb 06 '23 at 15:38
I don't have access to TFS currently, but if the file in the shelveset has a unique idenitifer (like say $/x/y/z/a.b.c;SH='ShelvesetName') you should be able to issue a command line tf dff command to compare each one.
Or
If you unshelve one and then use the command line TFS power tools to compare the other one with the review command
tfpt review /shelveset:shelvesetName;userName
The power tools are version specific and you can download the following versions:

- 64,563
- 18
- 145
- 216
-
21The tfpt review command doesn't seem to be able to compare against your local disk. The Diff button gives you the changes from the original version, and Diff Latest gives you the changes from the latest version on the server. Neither is what the original questioner asked for. – Ian Goldby Feb 23 '12 at 15:19
-
2Down voted because it says 'you should'. So it's a guess then? – Martin Capodici Apr 14 '13 at 23:26
-
9The documentation states that you can only compare a shelveset to a server version, not your local files OR another shelveset. So unless someone proves that it works, both statements in this answer are wrong :/ – SvenS Jul 03 '13 at 09:18
-
The tfpt link seems dead. Can you try [this one](https://visualstudiogallery.msdn.microsoft.com/898a828a-af00-42c6-bbb2-530dc7b8f2e1/file/177107/1/tfpt.msi?SRC=VSIDE) and confirm? – aloisdg Jan 02 '17 at 14:55
-
Neither of these suggestions works. tfpt review cannot compare a shelveset to local changes, and tf diff cannot compare two shelvesets. – Aidan Ryan May 25 '17 at 14:22
-
The question was about a shelvesets and the what you originally had, but and not a shelfset and local changes. – Preet Sangha May 26 '17 at 22:28
-
As others have said, down-voted because `tf diff` only compares to server version, not local files, so for comparing two shelvesets, that options does not work. – John Chase Mar 14 '22 at 12:22
In Visual Studio you can go to Team Explorer, Pending Changes, Actions - Find Shelvesets, then find your Shelveset, right click and View ShelveSet Details, you end up with a list of file, right click the one you're interested in and choose Compare with Workset.

- 99
- 2
- 9