Language: C#
Queue a Build
using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.Build.Client; namespace Microsoft.TeamFoundation.Sample { class Program { static void Main(string[] args) { // replace this string with the URI to your team project collection using (var tfs = TeamFoundationServerFactory.GetServer("[TFS Uri]")) { // replace these two strings with the team project and build definition var teamProject = "[team project]"; var definitionName = "[build definition]"; var buildServer = (IBuildServer)tfs.GetService(typeof(IBuildServer)); var buildDefinition = buildServer.GetBuildDefinition(teamProject, definitionName); var buildRequest = buildServer.CreateBuildRequest(buildDefinition.Uri); buildServer.QueueBuild(buildRequest); } } } }
Tags:
Description:
Queues a new build of the specified build definition in the specified team project
Report Abuse
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search

