Here's another possibility: if you use symlinks (symbolic link to a another file in your solution), and you delete the original file without getting rid of the link, you will get this error. You can delete the link in the .csproj file.