Dynamic config transform can be used to automatically creating multiple version of web.config from a main config file. This techniques is used to creates build for different environments like DEV,TEST,Production.
Select new in drop down
Provide name of configuration like “Release.PROD”
Also select Base build definitions like “Release”
Now Click Close
Right Click on project >>Add Config Transform
Now you will see new config generated as below
Now open the newly created configuration file >>Web.Release.Prod.config” and con comment following section
Modify “name=MyDB” >> name="ApplicationServices" ( as defined in main config file)
Now you new transform is ready to use. Select new build type from drop down
Then Right Click on Project >>Publish , Provide necessary information and publish you project to destination as release Build
Check out the final configuration generated and deploy location it will have required tronsform
Further References
How to implement Config Transform (dynamic config mapping ) (Step By step)
Create a simple ASP.Net Project
GO to Build>>Configuration ManagerSelect new in drop down
Provide name of configuration like “Release.PROD”
Also select Base build definitions like “Release”
Now Click Close
Right Click on project >>Add Config Transform
Now you will see new config generated as below
Now open the newly created configuration file >>Web.Release.Prod.config” and con comment following section
Modify “name=MyDB” >> name="ApplicationServices" ( as defined in main config file)
Now you new transform is ready to use. Select new build type from drop down
Then Right Click on Project >>Publish , Provide necessary information and publish you project to destination as release Build
Check out the final configuration generated and deploy location it will have required tronsform
Further References
- Config transform provide more smart replacement syntax that can be found at http://msdn.microsoft.com/en-us/library/dd465326.aspx
- MSDN Articles http://msdn.microsoft.com/en-us/library/dd465318.aspx
- MSDN Videos http://msdn.microsoft.com/en-us/vstudio/ff801895.aspx
No comments:
Post a Comment