2016-06-09 62 views

回答

1

最简单的方法是简单地从你的PowerShell中调用tf.exe,并让它在更改后检入文件。

& tf vc checkout filename.ext 
# edit the file using powershell 
& tf vc checkin filename.ext 

或者你也可以像我在VSTS TFVC扩展,它利用PowerShell来检查文件中作为构建过程的一部分正在做调用API TFS对象。它确实需要相当多的代码才能在任何情况下都能正常工作。由于它都是开源的,你可以在这里找到它:

https://github.com/jessehouwing/vsts-tfvc-tasks/blob/master/vsts-tfvc-checkin/TfvcCheckin.ps1

+0

Thanks!能够解决您的提示问题! – user2332131