The project file has been moved renamed or is not on your computer

后端 未结 15 1188
心在旅途
心在旅途 2020-12-22 20:49

I get this error when I try to load a VS 2008 project from TFS source control:

The project file has been moved, renamed or is not on your computer

15条回答
  •  礼貌的吻别
    2020-12-22 21:02

    TFS works like most source control packages: It remembers what it has put on your computer so that when you "Get Latest" it only has to get the chnages since your last "Get" instead of having to get absolutely everything.

    This has one caveat: If you delete or rename the local files on your disk, TFS won't know that you have done this, and it will still think they are where it left them.

    If you then "Get Latest" it will not bother to update the missing files.

    You are then likely to get all kinds of "missing file" errors, from TFS and any other tools that look for the files.

    To get around it, you need to:

    • If you think you might have any changes in there that you don't want to lose, copy the source folder on your PC as a back up just in case!
    • Right click on the project (in Solution Explorer) or folder (in Source Control)
    • Choose "Get Specific Version" from the context menu
    • Choose to get the "Latest Version" and tick the option that says (something like) "force get of files already in your workspace", which tells TFS to forget about what it "knows" and get all the files again anyway.

    If you have any locally-changed (writable) files, then be careful. There is a second option that will overwrite these, losing your changes. But you have the backup, so you should be safe. It's generally better to tick this option as well to make sure that all your source code is completely up to date. (But obviously only if you don't mind losing any local changes!)

    When you OK, this will forcibly get all the files in the project to your local drive, and should correct the problem.

提交回复
热议问题