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

Viewed 71349

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

After I click OK the project says "unavailable". What is the problem? How do I resolve this? I never had this problem before. Some blogs said to delete the .suo file but I can't locate the .suo file. I deleted the entire project on my local computer so that the next time it opens it will create a new one, but I still get same error.

16 Answers

What typically helps to fix it is deleting the Solution User Options aka "SUO".

VS up to 2013

In the older VS it is stored as a "hidden" SolutionName.suo in the same folder as the main .sln file.

VS2015 or later

In VS2015 the same data was moved to a "hidden" .vs folder under the same folder as the main .sln file.

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.

Easiest option worked out for me is:

  1. Right click the project & Remove the "not loaded" or "unavailable" project
  2. Right click the solution & Add "Existing Project"

Try opening the .csproj or .vbproj instead of the .sln. What has probably happened is the .sln (solution) file has a absolute file reference (instead of a relative path) to the compoenent project(s). You may need to re-create the .sln, or hand-edit it.

I found it easiest to create a new Solution sln file.

Clear out your workspace mappings (File -> Source Control -> Workspaces). Edit the workspace and either clear out all the mappings (more repercussion) or find the one that's associated to this server path. Then open Source Control Explorer and remap. Double click the SLN in Source Control explorer and it should get latest. Not entirely sure what has happened or what state you managed to get into, but with this should get you moving again.

I ran into this issue and was able to resolve it by obtaining the .rptproj files from a co-worker and copying them into my local directory. The project was then able to re-load.

Right click on the unavailable project and edit the project file ... chances are, you will find a hardcoded file path or a virtual one that does not match where you checked the project out to.

Kindness,

Dan

Sometimes, even though you changed .sln and .csproj path, and manually rename, you might forget to check the folder name that contains the project.

It happened to me too. Apparently the csproj files were not checked in when I had created them in my old computer, and so when I downloaded the project from TFS in my new computer, the files were not there.

After checking them in using my old computer and getting them from TFS in the new computer, I succeeded in reloading the project.

Related