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

Visual StudioTfsVisual Studio-2008

Visual Studio Problem Overview


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.

Visual Studio Solutions


Solution 1 - Visual Studio

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.

Solution 2 - Visual Studio

I just ran into this issue using VS 2013 after renaming a project. Stanley's answer guided me to the solution:

Close VS - delete .suo file - start VS again.

Solution 3 - Visual Studio

Delete the .suo file in a special way.

  1. Don't have the solution open when you delete the hidden .suo file.
  2. Restart VisualStudio.
  3. Open solution and Add project without error message.

Solution 4 - Visual Studio

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.

Solution 5 - Visual Studio

Though it's well known VS defect, definately we can handle it!

  • Open the solution file in edit mode

  • Modify the relative path to match the modified/moved physical path ..

     SccProjectUniqueName1 = Source\\Order\\Order.csproj
     SccProjectName1 = Order.ApplicationService
     SccLocalPath1 = Order.ApplicationService
    
  • Also, makesure of correct relative path for the referring project(s)

     Project("{asdasd-301F-11D3-BF4B-asdasd}") = "Order",
             "Source\Order\Order.csproj", "{E25641BC-C990-40E2-8876-08AE8728F763}"
     EndProject
    

Solution 6 - Visual Studio

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"

Solution 7 - Visual Studio

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.

Solution 8 - Visual Studio

In my case, deleting the .suo file was insufficient. I discovered that my workspace configuration had an error. I discovered and resolved the problem with these steps:

  1. In Team Explorer, "Manage Workspaces..."

    enter image description here

  2. Click "Edit..."

    enter image description here

  3. Correct the value under "Local Folder"

    enter image description here

  4. Finally, delete the affected .suo files per the accepted answer.

Solution 9 - Visual Studio

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

Solution 10 - Visual Studio

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.

Solution 11 - Visual Studio

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.

Solution 12 - Visual Studio

I spent a lot of time for trying solve this problem. I did these steps : rename project, rename namespaces, rename project folder, edit .sln file, edit hidden .suo file. Project loaded but it was unrecognizable for TFS! Finally I found this guide.

If you're using Resharper and TFVC is your version control, follow these steps :
  • Right-click the project in Solution Explorer, select Rename, and enter the new name

  • Right-click the project again and select Properties. Change the "Assembly name" and "Default namespace" on the Application tab.

  • Right-click the project again and select Refactor -> Adjust Namespaces. Accept the changes.

  • Change the AssemblyTitle and AssemblyProduct in Properties/AssemblyInfo.cs

  • Delete bin and obj directories in Windows Explorer

  • Open the Source Control Explorer and rename the project's directory. This will close the solution. Let it be closed.

  • Open the SLN file (with a text editor such as Notepad++) and change the path to the project (there should be multiple places).

  • Open the Solution again. Clean and Rebuild the project.

Solution 13 - Visual Studio

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

Solution 14 - Visual Studio

Solution for this

  1. Again rename the project folder
  2. Set specific version & force get in TFS
  3. remove read only & hidden option in the latest folder (not the rename one)
  4. Now you can open the project without any issues

Solution 15 - Visual Studio

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

Solution 16 - Visual Studio

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionsineasView Question on Stackoverflow
Solution 1 - Visual StudioStanley.GoldmanView Answer on Stackoverflow
Solution 2 - Visual StudioAndreasVView Answer on Stackoverflow
Solution 3 - Visual StudioMikhael LooView Answer on Stackoverflow
Solution 4 - Visual StudioJason WilliamsView Answer on Stackoverflow
Solution 5 - Visual Studiosandeep talabathulaView Answer on Stackoverflow
Solution 6 - Visual StudioArun Vinoth - MVPView Answer on Stackoverflow
Solution 7 - Visual StudioLilith RiverView Answer on Stackoverflow
Solution 8 - Visual StudioChris SchiffhauerView Answer on Stackoverflow
Solution 9 - Visual StudioDavidView Answer on Stackoverflow
Solution 10 - Visual StudioRyan CromwellView Answer on Stackoverflow
Solution 11 - Visual StudioSaywardView Answer on Stackoverflow
Solution 12 - Visual StudioABSView Answer on Stackoverflow
Solution 13 - Visual StudioDaniel ElliottView Answer on Stackoverflow
Solution 14 - Visual StudioSaman JayatilakeView Answer on Stackoverflow
Solution 15 - Visual StudioSMPHView Answer on Stackoverflow
Solution 16 - Visual StudioOranit DarView Answer on Stackoverflow