Bisque TFS UpdateAppConfig

Bisque TFS UpdateAppConfig allows the build process to update values in deployed (copied to the bin\$(Configuration) directory and renamed to myproject.dll.config).  It works by specifying the XPath to the configuration element to update and providing a new value for an attribute.

In the example below, a connection string is being updated.  The connection string element is selected via the XPath of “configuration/connectionStrings/add[@name=’CodeCamperDbContext’]”.

Then the actual attribute to update is specified as “connectionString”.

Lastly, the actual connection string attribute’s value is updated with the value of “Data Source=$(MySqlForBuildTestEndPoint);user id=$(MySqlForBuildTestMasterUserName);password=$(MySqlForBuildTestMasterPassword);”

Note there are environment variables specified in the connection string’s value.  These are evaluated by the task and replaced.  These environment variables were created from outputs from Bisque TFS AwsCloudFormationDeploy.

UpdateAppConfig