0

Elements included into C# projects (defined in MSBuild format), such as folders, files to compile, or resource files, can be grouped into <ItemGroup> elements.

When I look at various of the project files generated by SharpDevelop, normally, several item groups are created. For some reason, items seem to be sorted more or less randomly into those groups (I think all folders are gathered in their own group, but that's about the only pattern I can recognize). I am trying to find out the reasons for this, or, if there is no external reason, I am simply hoping for a (somewhat referenced) statement like "It doesn't matter, items can be sorted into item groups in any fashion."

Is there any benefit of a particular grouping pattern towards MSBuild?

O. R. Mapper
  • 20,083
  • 9
  • 69
  • 114
  • For MsBuild it doesn't matter. VisualStudio does it for clarity (I think), because it names some ItemGroups (e.g. ``) and it's project generation logic also seems to contain something like 'the nth ItemGroup is the one for include files, the nth+1 is the one for source files' etc because if you remove one of those they just get created again by VS. – stijn Aug 02 '16 at 08:54
  • @stijn: Do you happen to know of any official (or even unofficial) docs that support this? In any case, this comment should probably be an answer. – O. R. Mapper Aug 02 '16 at 13:51
  • 1
    No I don't have anything at all to support this, it's just what I deduced from working with it and that's why I made it a comment. But if nobody else comes up with an answer I'll add it as such I guess – stijn Aug 02 '16 at 14:52

0 Answers0