Reputation: 5010
I need to manually modify my .vcxproj
and I'm trying to understand the MSbuild schema using the documentation.
In my existing .vcxproj
, I have the tag <PropertyGroup Label="Globals">
but in the documentation there is no mention of the Label
attribute.
This is for an existing Visual Studio C++ project and there's no error when I launch it.
What does the Label
attribute do?
Upvotes: 8
Views: 2252
Reputation: 35921
It is nowhere fully documented; the Target element documentation mentions it, but it has just
Optional attribute.
An identifier that can identify or order system and user elements.
A quick glance at the source code also reveals it is not actively used by the build system itself: it's just there, you can assign values to it and get them back, that's it. As such it can serve as a means of adding a description to the xml (instead of using a comment). This description can also be retrieved programmatically by the build system. Which is the only use I have actually seen by a tool, namely Visual Studio: as you figured it generates project files which contains some labels. VS uses these to determine where to find/insert code produced by it's user interface. Good example is the PropertySheets label: it's just an ImportGroup, you can have an arbitrary amount of those, but only the ImportGroup with the label PropertySheets will be displayed and modified by the Property Manager in VS. Likewise for the ProjectConfigurations ItemGroup, the Globals PropertyGroup, the Configuration Items etc.
Upvotes: 11