使用 xcopy 命令的 Visual Studio BeforeBuild
我正在使用以下 beforebuild 目标,这工作正常:
<Target Name="BeforeBuild" Condition=" $(Configuration) == 'Debug' ">
<Exec Command="xcopy ..\mycomponent\mylateboundassembly\bin\debug\*.* bin /q /r /y">
</Target>
但是,当文件夹 mycomponent (我的组件)中有一个我无法删除(遗留代码)的空格时,我无法让 xcopy 工作
任何人都知道在 beforebuild 中使用 xcopy 的方法路径有空格吗? 谢谢
I am using the following beforebuild target and this works fine:
<Target Name="BeforeBuild" Condition=" $(Configuration) == 'Debug' ">
<Exec Command="xcopy ..\mycomponent\mylateboundassembly\bin\debug\*.* bin /q /r /y">
</Target>
however when the folder mycomponent has a space in it (my component) which i cannot remove(legacy code), I cannot get xcopy to work
Anyone know a way use xcopy in beforebuild where paths have a space?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我通过执行以下操作使其工作:
将项目添加到属性组(测试)
然后在 Exec 命令中使用属性组项目
I got this to work by performing the following:
Add an item to the property group (test)
Then in Exec command use the property group item
在文件路径两边加引号。
Put quotes around the file path.