Visual Studio project file is unloaded, cannot be opened, or load failed(project is renamed)

Lionsure 2020-07-18 Original by the website

Sometimes, I use Visual Studio to open the program solution, but it shows errors such as the project file is unloaded or the project fails to load. Why does this happen? Generally, it is because the path of project has been changed or its name has been changed. Regardless of the changed path or name, Visual Studio failed to load the project because it could not be found based on the original path.

When encountering problems such as Visual Studio project files being unloaded, you should first go to the folder where the solution is located(maybe in other folders) to check whether the project is still there; if it is not, it will naturally not be able to open and fail to load; if it is still, check its project name has been changed? After the above inspection, the problem also surfaced.

 

1. The reason for Visual Studio project file is unloaded, cannot be opened, or load failed

The project is deleted, its path is changed, or its name is modified, no matter what the reason will cause Visual Studio to fail to load the project.

 

2. The Solution for Visual Studio project file is unloaded, cannot be opened, or load failed

Method 1: Restore

If the project path is changed, copy it back to the original folder(usually the folder where the solution is located); if you only modify the project name, change it back to the original name; Visual Studio will not fail to load.

 

Method 2: Add again

1. Delete the project that failed to load, right-click "Solution", select "Add" → Existing project, as shown in Figure 1:

Visual Studio project file is unloaded, cannot be opened, or load failed

Figure 1

2. In the "Add Existing Project" window that opens, locate the folder where the project to be added is located, select the file with the C# icon, and click "Open" to add it to the solution, as shown in Figure 2:

Add Existing Project

Figure 2

3. Re-adding the project to the solution is not much different from the original one. What may change is the reference relationship between projects, and the reference relationship needs to be re-established.