I was taken aback when I did not see this option in the context menu in TFS if I right clicked a changeset upto which things were working. One of my colleagues suggested the following:
- Do a “Get Specific” with the changeset upto which everything was fine
- Checkout all affected files
- Resolve conflicts (there should be some)
- Checkin the files
You effectively overwrite your changes with the previous changeset.
Some things to note though:
- If project and solution files were modified, you may need additional checks to ensure they have been rolled back
- Sometimes, you may need to make some changes so that TFS detects that the files have changed (e.g. add a space at the end of a codefile
Turns out, there is another way to do a rollback through the TF commandline tool (using VS command prompt) as detailed in MSDN although, as the comments at the bottom suggest, you may need to change directory to your workspace.