msbuild - 标记 propertygroup 具有属性 Label 但未记录
msbuild - tag propertygroup has attribute Label but not documented
我需要手动修改我的 .vcxproj
,我正在尝试使用 the documentation 来理解 MSbuild 架构。
在我现有的 .vcxproj
中,我有标签 <PropertyGroup Label="Globals">
但在 the documentation 中没有提到 Label
属性。
这是针对现有 Visual Studio C++ 项目的,启动它时没有错误。
Label
属性有什么作用?
没有完整的文档记录; Target 元素文档提到了它,但它只有
Optional attribute.
An identifier that can identify or order system and user elements.
快速浏览 source code 还可以发现构建系统本身并未主动使用它:它就在那里,您可以为其赋值并取回它们,仅此而已。因此,它可以作为向 xml 添加描述的一种方式(而不是使用注释)。此描述也可以由构建系统以编程方式检索。这是我实际看到的工具的唯一用途,即 Visual Studio:如您所想,它会生成包含一些标签的项目文件。 VS 使用这些来确定 find/insert 由其用户界面生成的代码的位置。 属性Sheets 标签就是一个很好的例子:它只是一个 ImportGroup,您可以拥有任意数量的标签,但只有标签为 属性Sheets 的 ImportGroup 才会被 属性 经理在VS。同样,对于 ProjectConfigurations ItemGroup、Globals 属性Group、Configuration Items 等
我需要手动修改我的 .vcxproj
,我正在尝试使用 the documentation 来理解 MSbuild 架构。
在我现有的 .vcxproj
中,我有标签 <PropertyGroup Label="Globals">
但在 the documentation 中没有提到 Label
属性。
这是针对现有 Visual Studio C++ 项目的,启动它时没有错误。
Label
属性有什么作用?
没有完整的文档记录; Target 元素文档提到了它,但它只有
Optional attribute.
An identifier that can identify or order system and user elements.
快速浏览 source code 还可以发现构建系统本身并未主动使用它:它就在那里,您可以为其赋值并取回它们,仅此而已。因此,它可以作为向 xml 添加描述的一种方式(而不是使用注释)。此描述也可以由构建系统以编程方式检索。这是我实际看到的工具的唯一用途,即 Visual Studio:如您所想,它会生成包含一些标签的项目文件。 VS 使用这些来确定 find/insert 由其用户界面生成的代码的位置。 属性Sheets 标签就是一个很好的例子:它只是一个 ImportGroup,您可以拥有任意数量的标签,但只有标签为 属性Sheets 的 ImportGroup 才会被 属性 经理在VS。同样,对于 ProjectConfigurations ItemGroup、Globals 属性Group、Configuration Items 等