c# - Transforming web.config Transform files across environments and projects -
so here dilemma. have web.config file. have fifteen transform files, once each environment (lab1, lab2, etc., alpha, beta, prod, etc.). multiply 30 projects.
rather trying maintain 15 transform files across 30 projects like:
parse each transform file. each environment/configuration/setting, store data parsed file in database. create "master" transform file merge of environment-specific transform files (assuming web.release.config have majority of transforms) allow user run c# program accesses database , based on desired environment, takes master transform file , replaces settings (ie "value") environment/configuration specific values db.
what have: c# program stores env/config/setting in db. can create , update. powershell program calls above set or set of env/config/setting.
what need: way parse transform file, identify each transform call, , store env/config/setting value in db.
then best way "merge" 15 transform config files master transform file, making sure there no duplication , notating values need replaced. thinking using square brackets - not used anyplace else in config file, great way this:
add key="labname" value=[[replace me]]
transforms production environment into
add key="labname" value="prod"
thanks in advance.
Comments
Post a Comment