One or more projects in the solution could not be loaded

You will see a dialog box just like the following when you try to open a .sln file if you using Visual Studio and TFS:

"One or more projects in the solution could not be loaded for the following reason(s):
The project file or web has been moved, renamed or is not on your computer.
These project will be labeled as unavailable in Solution Explorer. Expand the project node to 
show the reason the project could not be loaded."

Whatever you did before, if you can't get your job done, try this way and you'll be lucky:  
1. Check out the .sln file and open it with any your favored text editor.
2. Adjust the following sections in the .sln file to the correct paths and names:
Project("{dummy-solution-guid}") = "dummy-project-name", "dummy-project-path\dummy-project-name.csproj", "{dummy-project-guid)}"
    SccProjectUniqueNameN = dummy-project-path\\dummy-project-name.csproj
    SccProjectNameN = dummy-project-name
    SccLocalPathN = dummy-project-path
3. Delete the .vssscc files under the .sln folder and dummy projects folders.
4. Open the .sln file and save it then close it.
5. Re-Open the .sln file and check it in TFS.

No comments: