Visual Studio 2019 project unloaded

leo del ciello 66 Reputation points
2022-05-26T07:25:55.453+00:00

Hello,

I have a solution developed for VS 2019.
This solution contains 4 projects.
Whenever I open the solution, one of these projects cannot be loaded : I end up having a warning in the branch corresponding to the project, which says "The project has been unloaded": and the project tree is empty.
All the other three projects are loaded correctly and show their branches.
If I browse with explorer to the corresponding folder I can correctly find the project file and all the files the make up the project.
If I open the project file I cannot see anything strange (as far as I can understand).
I just see in the unloadable project's ".csproj" file that a tag like :

<Import "Project=$(MSBuildExtensionPath)\$(MSBuildToolsVersion)\Microsoft.Common.props Condition="Exists ('$MSBuildExtensionPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>

is present, but by removing it, nothing changes.
There are other tags present, which are not present in the other functioning project's ".csproj", but they are empty.
I find this problems popping up periodically and random.
I even realigned VS 2019 to the latest update, but with no effect on this problem.
What could be the reason ?
I am loading everything as an Administrator, since in the past I had this same problem with some other projects and at that time it seems loading as an Administrator solved them.
But now its happening again.
Can anyone help me ?
Thanks in advance

Developer technologies | Visual Studio | Other
Developer technologies | C#
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 78,006 Reputation points Volunteer Moderator
    2022-05-27T16:27:56.427+00:00

    project typically don't load for a couple reasons

    1) the required visual studio workload is not installed
    2) syntax error in project file
    3) project file is too old a version for the current visual studio version
    4) the solution file and project file are out of sync

    after opening the solution, right click on the project and select load, it should report the error.

    the first step is to get the project to load. open the project directly with visual studio, not thru the solution. fix any errors.

    once this works, reopen the solution. if the project still won't load try:

    remove project from solution and close solution
    reopen solution
    re-add the project to the solution
    update project dependencies


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.