Web部署项目AfterBuild路径问题
我目前正在为一个网络项目设置构建服务器。我正在使用 Web 部署项目创建可部署包,并且想要进行一些简单的文件管理(复制 webDeploy.config -> web.config 并删除 .csproj 文件)。
我的目标如下所示:
<Target Name="AfterBuild">
<Delete Files="$(OutputPath)\*.csproj" />
</Target>
但是,检查 WDP 的输出会给出此
Target "AfterBuild" in file "C:\project\Deployment\Project.Deployment.wdproj":
Task "Delete"
File ".\Debug\*.*" doesn't exist. Skipping.
Done executing task "Delete".
Done building target "AfterBuild" in project "Project.Deployment.wdproj".
部署路径确实包含调试路径。我做错了什么?
I'm currently in the process of setting up a build server for a web project. I'm using Web Deployment Project to create a deployable package and I want to do some simple file administration (copy webDeploy.config -> web.config and delete .csproj files).
My target looks as follows:
<Target Name="AfterBuild">
<Delete Files="$(OutputPath)\*.csproj" />
</Target>
However, inspecting the output of the WDP gives me this
Target "AfterBuild" in file "C:\project\Deployment\Project.Deployment.wdproj":
Task "Delete"
File ".\Debug\*.*" doesn't exist. Skipping.
Done executing task "Delete".
Done building target "AfterBuild" in project "Project.Deployment.wdproj".
The Deployment path does indeed contain a Debug path. What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想使用通配符,您可以在项目列表中这样做。项目列表将为您扩展通配符。所以在你的情况下:
If you want to use wildcards you will have do so in an item list. The item list will take care of expanding the wild cards for you. So in your case:
我自己尝试了一下,很震惊,但解释很简单:你不能使用通配符 (MSBuild 团队博客)。
样本:
I tried it myself and was stunned but the explanation is simple: You cannot use wildcards (MSBuild Team Blog).
Sample: