MSBuild: command line build error: solution file error MSB5023: error while analyzing the project sub section

I have a solution that uses Solution Packages to separate projects. In the Visual Studio IDE, the solution is well built.

However, when I run the build using MSBuild from the command line, I get the following error: -

Solution file error MSB5023: Error parsing the nested project section in solution file. A project with the GUID "{Some Project GUID}" is listed as being nested under project "{Some Solution Folder Project GUID}", but does not exist in the solution. 

Now I checked these two GUIDs and they exist, one as a project, the other as the solution folder into which the project is embedded. There should be no problem.

Does anyone have a way to resolve this?

+5
source share
2 answers

I ran into the same problem and managed to figure it out:

  • Opened .sln in NotePad and found Guides
  • One of my projects was not closed ("EndProject" was skipped)

Cheers, hope this helps someone

+15
source

Or you can add a new file to the solution and save. This should rebuild the solution. After the assembly is confirmed, it works fine, the file can be safely deleted and saved.

+2
source

Source: https://habr.com/ru/post/1247645/


All Articles