简体   繁体   中英

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. I include them within my command like so (but happy to alter if needed)

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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