An alternative solution, if you want to update the element in web.config using the configuration conversion, and the element is missing, you can simply add an empty element to web.config and configure your web.Release.config like this:
web.config:
<system.web> <httpModules> </httpModules> ...
web.Release.config:
<system.web> <httpModules> <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" xdt:Transform="Insert" /> <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah" xdt:Transform="Insert" /> </httpModules> ...
Thus, you can combine your new properties into a web configuration when you deploy!
source share