Reputation: 2210
I have a DNN manifest file with this:
<configuration>
<nodes>
<node path="/configuration/appSettings" action="update" key="key" collision="overwrite">
<add key="LocalCurrencyCode" value="ARS"/>
</node>
and for uninstall I have this:
<uninstall>
<configuration>
<nodes>
<node path="/configuration/appsettings/add[@name='LocalCurrencyCode']" action="remove" />
However, when I uninstall the module the setting is not removed from web.config. Can anyone see what I am doing wrong?
Upvotes: 2
Views: 247
Reputation: 2210
Fixed it:
<uninstall>
<configuration>
<nodes>
<node path="/configuration/appSettings/add[@key='InvoiceEmailSubject']" action="remove" />
Turns out that I needed "appSettings" because xml nodes are case sensitive. I also needed to use @key= as provided by Dexterity above.
Upvotes: 3
Reputation: 1328
I think you can try to replace @name
with @key
in <uninstall>
section like this. There are no any name
attribute in appsettings
.
<node path="/configuration/appsettings/add[@key='LocalCurrencyCode']" action="remove" />
Upvotes: 0