Solution file error MSB5009: Error parsing the nested project section in solution file.
-
Sunday, October 08, 2006 10:58 PM
Hi,
We have been running with MsBuild to compile and test our solution on a nightly basis without issue. A change was made to the solution whereby some projects where factored out into their own solution. So that we now have two solutions (at the root of SCC). The main one referred to by MsBuild and compiled nightly, and a subsidary one that contains projects only indirectly related to the main one.
Since making this change we have the following MsBuild error on CoreCompile: "Solution file error MSB5009: Error parsing the nested project section in solution file."
Both new solutions work fine in Visual Studio, we can get them from SCC, compile them, etc.
We are totally baffled as to what this message means. Any help would be very gratefully received.
Thanks,
Paul.
Answers
-
Monday, October 09, 2006 7:58 PMModerator
Was the solution ever hand edited or modified or merged?
This sounds like a bug. Could you open one against us using the instructions at the top of the forum?
To try to get unblocked, you could backup the solution file and then try to recreate it using Visual Studio. That would fix the problem if it was a hand edit or merge that caused it. Otherwise perhaps you can simplify the solution somehow or divide it.
Dan
All Replies
-
Monday, October 09, 2006 7:58 PMModerator
Was the solution ever hand edited or modified or merged?
This sounds like a bug. Could you open one against us using the instructions at the top of the forum?
To try to get unblocked, you could backup the solution file and then try to recreate it using Visual Studio. That would fix the problem if it was a hand edit or merge that caused it. Otherwise perhaps you can simplify the solution somehow or divide it.
Dan
-
Wednesday, March 21, 2007 4:39 PM
Hi,
I encountered the same error today, and wasted a few hours playing and testing around to figure out what was wrong with my solution.
I finally got it working using a good old "manual" fix, i.e. I removed the entire "GlobalSection(NestedProjects) = preSolution" section (giving me an awfull solution with lots of projects (we have 79 projects active actually), and set back all the nesting by moving the projects back to their originating folders.
I started a new nightly build, and it worked (well actually it failed, but because one of the developers checked-in code that did not compile, so this was an easy one).
After I got it working, I looked for the differences between my old "broken" solution and the new "fixed" one.
The only difference (and it is a big one) is that it seems Visual Studio messed up the nesting when one of my developers excluded (and did not delete) one of the projects from the solution, it effectively removed the project and all references to this project from the solution, but it simply forgot to remove the "nested" reference of that specific project.
E.g: I have a line "{B8BCAC7A-FCA7-4D07-802B-03682CACFD52}={0F6EEC81-2477-4A70-BA68-DF3E2DA6D743}" in the nested references while project "{B8BCAC7A-FCA7-4D07-802B-03682CACFD52}" is not in the solution anymore. --> Maybe a Visual Studio 2005 Bug (post SP1 I guess, I already excluded projects before the SP1 was applied, and didn't encounter this error).
Visul Studio seems to support it gracefully, not saying anything about this line that does not mean anything to him (the guid is not a project), but MSBuild does not, and is really not exhaustive about this error.
So only thing to do, when you exclude a project from a solution that needs MSBuild to work is to look manually in the solution file for any nesting reference to this project.
Cheers, hope this can help anyone.
Julien
-
Wednesday, June 11, 2008 11:28 PM
Hi,
I just add a new item, like a text file, then i deleted, and save the solution and i solved the problem. ( I think that when you save the solution VStudio generates the solution again). For me this worked fine.
Regards.
- Proposed As Answer by jigneshdpatel Tuesday, November 24, 2009 4:32 AM
-
Tuesday, October 21, 2008 4:41 PMHey. Thanks for this tip. It saved me a lot of time.
-
Friday, February 12, 2010 2:17 PMGot the same problem after a bad merge in source control (ClearCase), it was my fault, but the ClearCase merge tool is also not a gem of usability. And adding a removing a new file in VS has also set it right again.
-
Thursday, February 10, 2011 3:24 AMI met a same problem,but already sovled according to your advise. good help,thx man!
-
Thursday, January 19, 2012 12:19 AMYep! or even just moving some thing from one folder to another and back and saving the solution. Great work!

