MSBuild: Command Line Build error: Solution file e

2019-04-19 13:50发布

I have a solution which uses Solution Folders to split out the projects. In the Visual Studio IDE, the solution builds fine.

However when running 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've checked these two GUIDs over, and they exist, one as a project, the other as the solution folder that the project is nested under. There shouldn't be any problem.

Does anyone have a way to resolve this?

3条回答
女痞
2楼-- · 2019-04-19 14:05

It is possible you may also have an issue where the line could have gotten in here with a merge conflict where it wasn't deleted when a project was deleted. If you can't find any other references in your project with a global search of the GUID, try deleting the line in the .sln file and rebuilding.

查看更多
家丑人穷心不美
3楼-- · 2019-04-19 14:17

Or you can add a new file to the solution and save. This should rebuild the solution. After confirming the build is working fine, the file can be safely removed and saved.

查看更多
我只想做你的唯一
4楼-- · 2019-04-19 14:28

I faced the same issue and managed to sort out:

  1. Opened .sln in NotePad and found Guids
  2. One of my projects wasn't closed ("EndProject" was missed)

Cheers, hope this can help anyone

查看更多
登录 后发表回答