Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this tutorial we will create a new Solution Configuration called production which we will then use from Continua when we are deploying our website.

Creating a Production Solution Configuration

In your ContinuaDeployTutorial website, open up the configuration manager and select <New...> from the Active solution configuration dropdown (as shown in the images below).

...

Once our Production Solution Configuration has been saved, you should now see it appear in the Solution Configuration dropdown.

Creating a Production Web.Config Transform

Now that we have created our Production Solution Configuration, we will need create a Web.Config Transform for our Production Solution Configuration. In your ContinuaDeployTutorial, expand your Web.Config file and you should see a Web.Debug.config and a Web.Release.config file.

...

This will add a new production config transform called Web.Production.config (as shown below).

Modifying the Web.Config and Working with Web.Config Transforms

Even though we now have 3 separate Web.Config transform files, there is still only one main config file that will need to be maintained during development. The main Web.Config file still contains all the config information for your web app, however these Web.Config transforms are used to change certain values depending on which Solution Configuration is being used at run time. It is important to note that the main Web.Config file should be configured to work on your local development machine. Any changes that occur through our Web.Config transforms will only occur when we publish our web app. So options like connection strings should point to your local development databases and any other appSettings should also point to locations on your local development machine.

...

You should notice that Web.Production.config is not a full config file but instead it only contains the config values that we wish to change for the production environment.

Testing your Production Web.Config

Now that we have our Web.Production.config transforming the connection string, we should test our web app to make sure that our Production Config is indeed overwriting the default web.config. So lets publish our web app using the Production Solution Configuration.

...