1. Open Configuration Manager
2. Add a new configuration
3. Add a new Config Transform
You will now see the newly added config file.
4. Modify the config file and add in sections of code that will be replaced with new configurations from your new environment. Highlighted in yellow, I have added a new connection string for the devlocal environment.
5. When you Publish or deploy your project, in the generated .zip file, the web.config will look like this…
When you deploy the application, the replaceable tokens will be replace by values in your “parameters.xml” file. If you don’t want this behavior and want the generated web.config file to contain the actual values, you can modify your .csproj file and add this
under the PropertyGroup section.
You can read more about this at http://msdn.microsoft.com/en-us/library/dd465318%28v=vs.100%29.aspx