I'm creating a NuGet package and want it to update the web projects Web.Config file with certain settings. I am using the web.config.transform to edit the web.config file of an application. It's working well when I simply add appSettings - like so:
<configuration>
<appSettings>
<add key="WebPToolFolder" value ="~/Tools"/>
<add key="ImagesFolder" value ="~/Content/themes/base/images"/>
</appSettings>
</configuration>
However, if I try an add to the staticContent it doesn't seem to alter the tags. For example, here is the web.config.transform file:
<configuration>
<appSettings>
<add key="WebPToolFolder" value ="~/Tools"/>
<add key="ImagesFolder" value ="~/Content/themes/base/images"/>
</appSettings>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".webp" mimeType="image/webp" />
</staticContent>
</system.webServer>
</configuration>
It updates the appSettings, but not the staticContent tags - any ideas?