TFS Build Definition - Can you add this to source

2019-04-07 10:31发布

I would like to add my Build Definitions to TFS Source Control. Is there anyway to do this?

标签: tfs build
2条回答
爷的心禁止访问
2楼-- · 2019-04-07 11:04

Not really, no. If you're trying to track changes to your build definitions, you can use a couple of new commands in the latest releast of the Team Foundation Power Tools. The first compares two build definitions:

tfpt builddefinition /diff 

This one exports a build definition's configuration to a text format, which you could then check into version control.

tfpt builddefinition /dump
查看更多
神经病院院长
3楼-- · 2019-04-07 11:15

Another option via powershell

https://gist.github.com/jstangroome/6747950

which basically uses c# types so should be easy enough to make into a linqpad or c# console app (or winforms or wpf)

used assemblies

  • Microsoft.TeamFoundation
  • Microsoft.TeamFoundation.Client
  • Microsoft.TeamFoundation.Build.Client
  • C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.Build.Workflow.dll
查看更多
登录 后发表回答