Closed WiredUK closed 8 years ago
Just as I got the notification that you merged my PR I had a minor moment of panic. My change just makes the transform update an existing key but will never create one for the new people installing from fresh. D'oh! The correct code should be:
<add key="RouteDebugger:Enabled" value="true"
xdt:Transform="InsertIfMissing" xdt:Locator="Match(key)"/>
Note that it's now InsertIfMissing
which makes perfect sense. This one has the added benefit that it won't overwrite an existing value so if a user has it disabled, it won't re-enable it.
(PS Love the gif though thanks!)
Ah! Want to submit a new PR?
The transform in the project causes a line to be added in the target
web.config
. However, if that line already exists (i.e. when updating Nuget packages) it still gets added and you end up with 2 entries. This is valid in aweb.config
file and the last entry is the one that gets used. Took me a while to figure out I had multiple entries after updating my packages today so thought I'd supply this fix.This change uses the standard Microsoft transform syntax to only update the existing entry. Nuget info is here if needed.