Deployment Manager - 1.0
XML configuration files - Deployment Manager
One of the essential steps in deploying software is configuring it to work in a specific environment. This might mean pointing your application to the right database connection string, or tweaking settings to run in production.
Deployment Manager does two things to make configuring your application easy:
- Automatically updating
appSettingsandconnectionStrings - Executing configuration file transformations
App Settings and Connection Strings
If a variable is defined in the Deployment Manager web interface, and an appSettings or connectionString record exists for it in any of your .config files, Agent will automatically replace the value after extracting your package.
For example, suppose you have this configuration file:
<configuration>
<appSettings>
<add key="AWSAccessKey" value="testkey"/>
<add key="AWSSecretKey" value="testsecret"/>
</appSettings>
<connectionStrings>
<add name="DBConnectionString" value="Server=(local)\SQLExpress;Database=OnlineStore;Integrated Security=SSPI" />
</connectionStrings>
</configuration>
And you have these variables defined in your Deployment Manager web interface:

After deploying to an environment named Production, Deployment Manager will have updated the file to:
<configuration>
<appSettings>
<add key="AWSAccessKey" value="AKIAIXU765WQYXISJDK"/>
<add key="AWSSecretKey" value="MfOWQdSJWi8JDYc/6YmoaHafz8jByBl9aksCoSLB"/>
</appSettings>
<connectionStrings>
<add name="DBConnectionString" value="Server=SQLPROD01;Database=OnlineStore;Integrated Security=SSPI" />
</connectionStrings>
</configuration>
Note that this only works for appSettings and connectionStrings elements.
Configuration File Transformations
After deployment, Deployment Manager will also look for any files that follow the Microsoft web.config transformation process even files that are not web.config files (for example, YourService.exe.config).
The configuration transformation files can either be named *.Release.config, or *.<Environment>.config.
For example, suppose you have the following files in your NuGet package:
- Web.config
- Web.Release.config
- Web.Production.config
- Web.Test.config
When deploying to an environment named Production, Deployment Manager will execute Web.Release.config, followed by Web.Production.config.
An example web.config transformation that removes the <compilation debug="true"> attribute is below:
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
</system.web>
</configuration>
The team at AppHarbor created a useful tool to help test configuration file transformations.
PowerShell
If these conventions aren't enough to configure your application, you can always use PowerShell to perform custom configuration tasks. Variables will be passed to your PowerShell script, and PowerShell has rich XML API's.
Was this article helpful?
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Installing and upgrading