Click here to Skip to main content
15,881,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi ,

As everyone knows , in VS2010 and above there is a use of Web.config transforms to remove add update tags and attributes in a web.config file .

Release management has the ability to switch values inside a web.token.config (convention is a variable like so : __ConnectionString__ )

but what do i do in order to remove a whole section ? or add one for a different environment ? for example , qa should not have a debug option , so
in transforms we could
XML
<compilation xdt:Transform="RemoveAttributes(debug)" />


i really am trying to connect between transforms and release management but can't , they do not behave the same , a single build definition must know which web.config file to use (i use web.QA.config and web.prod.config) , while release template has only one build definition for both his qa and prod paths .

so , one release template with 2 stages (qa->prod) which has the same build definition cannot transform once for qa and once for prod (because again, it is defined in the build definition , from where to transform like
:/p:UseWPP_CopyWebApplication=true /p:PipelineDependsOnBuild=false /p:Configuration=QA /p:TransformConfigFiles=true 


i tried this link http://blogs.msdn.com/b/alming/archive/2015/01/19/using-web-config-transformations-and-release-manager.aspx[^]


but it does not help the build definition transform the right web.config according to the release path . he just build the web.release.config , which does not help .


i tried many other sites as well , non of them answers the simple question : how can release management transform the web config file beyond just a simple value swap , which is not enough in my scenario , how can it add tags , remove them change deeper configurations .
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900