有关 MSBuild 复制任务的快速问题
嗨,大家好, 我是 MSBuild 的新手,所以可能有些问题听起来很愚蠢。
使用 aspnetcompiler(如 App_globa.asax.compiled、default.master.compiled 等)时生成的这些额外文件是什么...
我尝试使用复制任务来复制 consanother iis 托管端点,该端点不是网站(.ashx)文件,但它正在复制所有 .cs, .csproj 等。有没有办法排除它们。并且 msbuild 在复制时也可以保持文件夹名称不变。因为当我使用复制任务时。它将所有内容合并为一个。
HI Guys,
Im newbie to MSBuild so may be some questions could sound stupid.
What are these extra files which gets generated while using aspnetcompiler like App_globa.asax.compiled,default.master.compiled etc....
I was trying to using copy task to copy the consanother iis hosted end points which is not web site(.ashx) files but it was copying all the .cs,.csproj etc.Is there anyway to exclude them. And also can msbuild maintain the foldername as it is while copying. because when Im using copy task. it is combining everything into one.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的评论中描述的情况下,您将包含 $(xfolder) 下的文件,并且仅排除当前目录下的文件,因为您的排除也没有指定 $(xfolder),所以基本上除非 $(xfolder) 恰好是当前文件夹,您没有排除任何内容。此外,您还缺少通配符,因此您仅尝试排除名为“.cs”而不是“*.cs”的文件。将您的排除修复为
In the case described in your comment, you are Including files under $(xfolder) and only excluding files under the current directory, since your Exclude doesn't also specify $(xfolder), so basically unless $(xfolder) happens to be the current folder, you aren't excluding anything. Also you are missing a wildcard, so you are only trying to exclude files named ".cs" and not "*.cs". Fix your Exclude to be