简体   繁体   English

MSBuild Force Item Include被视为自定义/文字

[英]MSBuild Force Item Include to be treated as custom/literal

I am defining my own Item in and ItemGroup where I have custom values that I don't want to be evaluated to paths 我在和ItemGroup中定义了自己的Item,在其中我有一些自定义值,这些值不希望被评估为路径

When I try to do transforms, the ./ is being treated as a path and so I only get a single item for transforms and batching. 当我尝试进行转换时,。/被视为路径,因此我仅获得用于转换和批处理的单个项目。

How can I force the . 我该如何强迫。 at the end to be treated as a literal? 最后被视为文字?

For using special characters in the Include attribute you can use the hexadecimal representations of the ASCII characters. 要在Include属性中使用特殊字符,可以使用ASCII字符的十六进制表示形式。 For example the symbol . 例如符号. will be represents as 2e . 将表示为2e The percent symbol always precedes the hexadecimal representation: %2e . 百分号始终位于十六进制表示形式%2e

You can get the full list of special characters to escape from the official documentation . 您可以获取特殊字符的完整列表,以避开官方文档


Special characters to escape | 特殊字符转义 | ASCII to Hex text converter ASCII到十六进制文本转换器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM