how to add files in web.config transformation process?

There are two ways for the web.config transform files to be generated within VS:

  1. If you have a web application project, Right-click on web.config and choose Add Config Transform. This will add any config transforms that are missing from your project based on build configurations (i.e. if you have Production and Staging build configs, both will get a transform added).
    • This method is not supported for Website projects as they do not support multiple build configurations.
  2. In either web project type, right click on a publish profile (.pubxml) and choose Add Config Transform. This will add a new config transform for that profile only.
    • This requires VS2012 Update 2 or the Azure SDK 2.0 for VS2010 (I think).
    • In a web site project, the new transform file will not be nested under web.config as VS doesn’t support that behavior. Just look for it in the root folder.

Leave a Comment