TFS 使用 MSBuild 添加文件

标签 tfs msbuild

我有许多在 MSBuild 过程中创建的文件,这些文件保存在 MSBuild 目录中。

我需要做的是将这些文件存储在 TFS 中的不同位置。但是我该如何使用 MSBuild 来做到这一点呢?

最佳答案

MSBuild Extension Pack有一组很好的与 TFS 交互的任务。 要从 MSBuild checkin 文件,请使用 MSBuild.ExtensionPack.VisualStudio.TfsSource 任务:

<MSBuild.ExtensionPack.VisualStudio.TfsSource 
    TaskAction="Checkin" 
    ItemPath="C:\projects\SpeedCMMI\Demo1" 
    WorkingDirectory="C:\projects\SpeedCMMI" 
    Comments="Testing" 
    Notes="Code reviewer=buildrobot" 
    OverrideText="Justdoit" />

关于TFS 使用 MSBuild 添加文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9924449/

相关文章:

tfs - 如何将 TFS 燃尽图配置为工作点而不是任务时间?

visual-studio - 有没有办法在Visual Studio中显示当前的TFS工作区?

tfs - 无法复制。该进程无法访问该文件,因为它正被另一个进程使用

c# - MsDeploy - 无法更新应用程序池

azure - Azure 中的 Visual Studio Team Services 构建服务器

java - 如何修复 java.security.cert.CertPathValidatorException : timestamp check failed

tfs - 查询以在所有父级(所有级别)的树中获取分配给我的所有项目

TFS 2018 更新 2 RC。 Web 性能缓慢

.net - .NET 4.0构建服务器引用程序集警告MSB3644

msbuild - 如何在 Bitbucket Pipelines 中构建子文件夹