Search code examples
c#visual-studio-2008refactoringsolutioncsproj

One or more projects could not be loaded, but VS but doesn't say which


I have a fairly large solution with multiple subprojects (mostly C# with 1 or 2 C++ projects), each in its own folder. I renamed the folders and the project names, then proceeded to editing the solution file using the same process described here: Proper way to rename solution (and directories) in Visual Studio

After doing this, I wanted to test if everything went right so I opened the solution file. VS2008 complains:

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 projects will be labeled as unavailable in Solution Explorer. Expand the project node to show the reason the project could not be loaded.

So I tried doing exactly as the bolded text says. However, there aren't any unavailable projects in Solution Explorer. All the subprojects are there, and I don't see any warning or errors or missing references or anything. The solution also compiles perfectly fine and I can run the application just fine as well.

The issue is that error keeps popping up when I open the solution, and I'm trying to stop it from doing so, because it's eventually going to enter into source control.

Has anyone encountered this before? Is there something I might've missed?


Solution

  • I seem to have found unloaded project, after noticing there's one missing by manually counting and comparing it to the number of projects the solution explorer reported. It was deep inside another folder in the solution explorer that I never used and assumed that had nothing worthwhile.

    Thanks for the tips.