简体   繁体   English

如何对带引号的文件的ItemGroup列表进行转义-MSBuild

[英]How to escape an ItemGroup list of files with quotes - MSBuild

I have the following item group in my project 我的项目中有以下项目组

<ItemGroup>
  <Include="$(ProjectDir)\Test\**\*.test" />
</ItemGroup>

How can I escape these paths? 我该如何逃避这些路径? I need them escaped so my exec command works. 我需要将它们转义,以便我的exec命令起作用。 I include them within my command like so (but happy to alter if needed) 我像这样将它们包含在命令中(但很乐意根据需要进行更改)

<Exec Command="$(xxx)xx.exe @(TestFiles, ' ')" />

您可以尝试在路径字符串中使用\\\\代替\\

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

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