53369

How to make build definition in TFS Build 2010 configurable w.r.t input variable values and “items t

We are using TFS Build 2010 for Builds. We have two branches of source code (Lets say branchA and branchB).

Now as a part of the build definition we set the projects to build: <img src="https://i.stack.imgur.com/W6dLb.jpg" alt="alt text">

Now to employ the same build definition from branchB will mean that I create another build definition file with same content, with only the items to build set to "$/branchB"

Is there anyway to make this configurable, without having to edit the build definition?

Also there are other input variables that we set for the build definition, and the values for these variables are included in the build definition XAML file. So to change the value of a variable will mean that we have to edit the build definition XAML file. This is not desirable.

I would like to be able to set the "Items to Build" and the variables of the build definition without having to modify the build definition XAML file.

Are there any solutions to these problems?

Answer1:

You can modify the Build Process Template so it only asks you for the Items to Build. The rest of the arguments are prefilled. To get an idea how this works, see http://www.ewaldhofman.nl/?tag=/build+2010+customization

Answer2:

You can add parameters to your build definition. I did this a while back because we had two web projects in a solution that had to be deployed to different servers (via Windows shares). I added parameters to the build def so that in the build properties I could customize them depending on if it was a dev deployment, staging, etc.

I added a blog post on how to do it. You can use the parameters this way so that they aren't kept in the XAML file.

Deploying Web Apps with a customized Build Process in TFS

Recommend

  • C# TimeZone Calculation Problem
  • Copying attributes in Javascript
  • Sort version strings on bash
  • How to have a website splash screen (web app)
  • How to convert WPF project so it can be used as a class library by a separate exe
  • Android Lock Screen C# .NET Replica
  • how to populate a SQLite database and use that database in phonegap?
  • Exception gevent.hub.LoopExit: LoopExit('This operation would block forever',)
  • WP8.1 AppBarButton holding event
  • how to set variables in a php include file?
  • Creating a DropDownList
  • Authentication in Play! and RestEasy
  • ListItem.Attributes.Add not working
  • Eloquent paginate function in Slim 3 project using twig
  • How to match http request and response using Jersey ContainerRequestFilter and ContainerResponseFilt
  • Java Scanner input dilemma. Automatically inputs without allowing user to type
  • Fetching methods from BroadcastReceiver to update UI
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • How to extract text from Word files using C#?
  • Symfony2: How to get request parameter
  • Convert array of 8 bytes to signed long in C++
  • what is the difference between the asp.net mvc application and asp.net web application
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • GridView Sorting works once only
  • php design question - will a Helper help here?
  • Matrix multiplication with MKL
  • WPF Applying a trigger on binding failure
  • Load html files in TinyMce
  • Free memory of cv::Mat loaded using FileStorage API
  • Understanding cpu registers
  • -fvisibility=hidden not passed by compiler for Debug builds
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • Are Kotlin's Float, Int etc optimised to built-in types in the JVM? [duplicate]
  • Does armcc optimizes non-volatile variables with -O0?
  • Recursive/Hierarchical Query Using Postgres
  • Running Map reduces the dimensions of the matrices
  • Binding checkboxes to object values in AngularJs
  • Conditional In-Line CSS for IE and Others?
  • jQuery Masonry / Isotope and fluid images: Momentary overlap on window resize
  • How do I use LINQ to get all the Items that have a particular SubItem?