Norbert Norbertson
Norbert Norbertson

Reputation: 2210

DNN module uninstall how to remove settings from web.config

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

Answers (2)

Norbert Norbertson
Norbert Norbertson

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

Keval Gangani
Keval Gangani

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

Related Questions