It is becoming more and more common for developers and testers to work with virtualized clients like those offered with Virtual PC or Hyper-V. We use this at Microsoft a great deal. Client virtualization offers many benefits for those working with pre-release software or who need to quickly change between client configurations. However, if you are using TFS version control on these virtualized clients you need to be aware of the impact of rolling back \undoing disks.
When you roll back to a snap shot or undo your session changes (with Virtual PC undo disks) the version of the files you have on disk can be different than the version that TFS thinks you have. Here is a worse case scenario:
Similarly, if you replace step 4 with a normal get latest foo.cs will not be updated since the server thinks you have the latest version 20 already, which you don't.
Use the Force - To get the server and workspace versions in sync again perform a get using the force option.
If you are using Hyper-V a better solution is to put your workspace on a drive that is offline to the host OS (Windows 2008) but known to the Hyper-V machine. You have to disassociate this offline drive from the Hyper-V machine before you do the rollback and re-attach afterwards. This keeps the rollback from affecting the workspace drive, leaving your workspace files the same.
You can enjoy the benefits of client virtualization and TFS Version Control by keeping in mind the impact of rolling back \undoing disks have on your TFS workspace. A simple post roll back step or putting your workspace on an offline hard drive (for Hyper-V users) is all you need to do.