Skip to content

Visual Studio Team System extension

Sergey Zwezdin edited this page Jun 23, 2016 · 7 revisions

Warning: There is some cache issue on VSTS plugin installation. Sometime extension can don't appear even if you're installed it. Until it will be fixed at TFS, the best solution is try to re-install extensions. (see #2 for more details)


To make life a bit easier there is Visual Studio Team System extension which built on top of Magic Chunks core.

Steps to install

Step 1: Install extensions into your VS Online account or on premise TFS.

Step 2: In your build or release definition add new build step.

Add new build step

Step 3: Select "Config transformation" under "Utility" group and click "Add".

Config transformation

Step 4: Specify configuration file path and required transformations. It should be represented as JSON (see below for more details).

Transformations

Step 5: Run build.

JSON representation for transformations

VSTS does not support key-value collection editor yet. So, to define your transformations you have to use plain JSON definition. It should contain set of properties (string - string) as described in this section.

Example of JSON transformation object:

{
  "configuration/system.web/compilation/@debug": "false",
  "configuration/system.web/authentication/@mode": "Forms"
}

TFS Build variables

TFS have useful build variables which you can use during config transformations. Just use TFS typical syntax for that - $(VariableName). For instance:

{
  "configuration/appSettings/add[@key='builtBy']/@value": "$(Build.QueuedBy)"
}

Read more details about build variables here.

Setup in 30 seconds

Setup in 30 seconds