title: How to add new sections to a web.config using xmlmassupdate (msbuild)
body: <p>As part of our installation of new versions we have web.config.delta files that adjust the existing web.config files as appropriate.  Now I know how to add/update/remove AppSetting keys (as all the posts I've found on this have been about that) but what I don't know how to do is add new section elements, add new sectiongroup.</p>
  
  <p>ie. this is all the new stuff in my web.config.  What do I need to change to make it get applied as a "delta"?</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;configuration xmlns:xmu="urn:msbuildcommunitytasks-xmlmassupdate"&gt;
  
  &lt;configSections&gt;
  &lt;section xmu:key="name" name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /&gt;
  &lt;section xmu:key="name" name="securityConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Security.Configuration.SecuritySettings, Microsoft.Practices.EnterpriseLibrary.Security, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true" /&gt;
  
  &lt;sectionGroup name="authorization" type="Company.Security.Configuration.AuthorizationSectionGroup, Company.Library"&gt;
        &lt;section name="rowLevelSecurity" type="Company.Security.Configuration.RowLevelAuthorizationSection, Company.Library"/&gt;
        &lt;section name="typeBasedSecurity" type="Company.Security.Configuration.TypeAuthorizationSection, Company.Library"/&gt;
      &lt;/sectionGroup&gt;
  
  &lt;/configSections&gt;
  
  &lt;enterpriseLibrary.ConfigurationSource selectedSource="System Configuration Source"&gt;
      &lt;sources&gt;
        &lt;add name="System Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
        &lt;add name="Security-FileBasedConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
          filePath="Config/Enterprise-Security.config" /&gt;
      &lt;/sources&gt;
      &lt;redirectSections&gt;
        &lt;add sourceName="Security-FileBasedConfigurationSource" name="securityConfiguration" /&gt;
      &lt;/redirectSections&gt;
    &lt;/enterpriseLibrary.ConfigurationSource&gt;
  
    &lt;authorization&gt;
      &lt;rowLevelSecurity defaultProvider="SqlMembershipRowLevelSecurity"&gt;
        &lt;providers&gt;
          &lt;add name="SqlMembershipRowLevelSecurity" type="Company.Security.DataAuthorization.SqlMembershipRowLevelSecurityProvider, Company.Library"  applicationName="app1" connectionStringName="SecurityConnection"/&gt;
        &lt;/providers&gt;
      &lt;/rowLevelSecurity&gt;
      &lt;typeBasedSecurity defaultProvider="SqlInPlaceTypeBasedSecurity"&gt;
        &lt;providers&gt;
          &lt;add name="SqlInPlaceTypeBasedSecurity" type="Company.Security.Providers.SqlEntityTypeFunctionTypeSecurityProvider, Company.Common"  applicationName="app1" connectionStringName="SecurityConnection"/&gt;
        &lt;/providers&gt;
      &lt;/typeBasedSecurity&gt;
    &lt;/authorization&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I can't seem to find any simple information on this stuff - but maybe I'm googling with the wrong terminology.</p>
  
  <p>Do I just need to replace the add bits like:</p>
  
  <pre><code>&lt;add name="System Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /&gt;
  
  &lt;add xmu:key="name" name="System Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.SystemConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" xmu:action="add" /&gt;
  </code></pre>
  
  <p>or do I have to do the same things for the section, sectiongroup and enterpriseLibrary.ConfigurationSource elements??</p>
  
  <p>Thanks!</p>