本文介绍MSB5029错误代码。
消息文本
MSB5029: The value 'value' of the 'value' attribute in element 'value' in file 'value' is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always defined and that the project and current working directory are not at the drive root.
DESCRIPTION
当项目元素的某个属性具有驱动器枚举通配符值时,会发生此错误。 例如,<Compile Include="$(NotAlwaysDefined)\**\*.cs"
。 如果属性未定义,则值 Include
将导致枚举驱动器上的所有文件。 为了避免出现这种意外的性能问题,MSBuild 报告这个错误。
决议
可以定义属性的默认值,或者更改通配符表达式,以更窄地限定对所要文件的搜索范围。
适用对象
MSBuild 17.0 及更高版本