visual studio - pubxml XML to change a web.config value on web deployment -
suppose have web.config parameter under <appsettings><add key="myparam" value="myvalue"/></appsettings> , want modify value myparam depending on publish profile use, ie development.pubxml , test.pubxml web site deployment.
what straightforward way accomplish this? how specify in pubxml keys want transform, are, etc?
either direct answer or link resource answers question highly appreciated.
you can create web.config transform files publish profiles build configurations. when publish, either in visual studio or command line, visual studio applies both appropriate build configuration transform , publish profile transform. see tutorial:
this 1 of series of tutorials. others in series run through examples of creating publish profile transforms , examples of doing command line.
the tutorials use web application project. if web site deployment mean you're deploying web site project, process same long have installed latest vs update (see first tutorial in series links vs update).
Comments
Post a Comment