Environment Config Setup

If you have multiple environments like most of us do and need to accommodate different settings in each there is an easy approach by using the Configuration Manager and the Web Transformations.
To get started go to
Setup environment (integration, acceptance, etc)

Then right click web.config and choose “Add Config Transform” that will add your environments in (as I have done in image below)






Now if you have a setting that is different between your debug, and Release you can put the setting in each config but in the override one you will add in the Transform and Locator attributes as shown.

  <add key="filestoragepath" value="\\mypath\Dev\"  xdt:Transform="Replace"   xdt:Locator="Match(key)" />

Comments

Popular posts from this blog

Linq Exclude from separate list

Sorting Ascending and Descending

Linq Query Syntax vs Method Syntax