This error happens if the file no longer exists in the file system but TFS has staged the changes.
Remove the file from the file system by clicking View > Other Windows > Source Control Explorer and delete the file from the solution in TFS and try checking in again.