使用 MSBuild 任务对 TFS 2010 中的目录进行 ftp

发布于 2024-09-15 22:08:44 字数 154 浏览 4 评论 0原文

是否有教程展示如何使用 MSBuild 任务(如 FtpUploadDirectoryContent)在 Team Build 2010 中使用 FTP 将文件/目录复制到远程主机?我从未在 TFS 2010 中使用过 MSBuild 任务。

Is there any tutorial to show how can I use MSBuild tasks like FtpUploadDirectoryContent to copy file/directory to a remote host using FTP in Team Build 2010? I never used a MSBuild task in TFS 2010.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

帅气尐潴 2024-09-22 22:08:44

只需将其放入某个项目的 AfterBuild 目标中 - 最好将其放入依赖关系图顶部的项目中。如果您不希望它在 Visual Studio 中运行,或者您只想针对特定生成配置进行 FTP 传输,则可以添加条件。例如:

<Project>
    ...
    <Target Name="AfterBuild" Condition="'$(BuildingInsideVisualStudio)'!='true'" >
        <!-- Insert your FTP task here -->
    </Target>
</Project>

查看如何:扩展 Visual Studio 生成过程

Just put it in the AfterBuild target of one of your projects - probably best to put it in the project that's at the top of your dependency graph. You can add a condition if you don't want it to run in Visual Studio, or if you only want to do the FTP transfer for a particular build configuration. For example:

<Project>
    ...
    <Target Name="AfterBuild" Condition="'$(BuildingInsideVisualStudio)'!='true'" >
        <!-- Insert your FTP task here -->
    </Target>
</Project>

See How to: Extend the Visual Studio Build Process

烟雨凡馨 2024-09-22 22:08:44

您可以考虑修改构建过程模板 (WF) 并使用 InvokeProcess 活动调用 FTP.exe。

如果内置的 Windows FTP 命令行客户端不适合您,还有一些 FTP 活动和命令行实用程序。

You might consider modifying your build process template (WF) and using the InvokeProcess activity call out to FTP.exe.

There are also a handful of FTP activities and command line utilties if the built in Windows FTP command line client doesn't work for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文