Is there a way to make a NuGet package transform a config transform file? For example, when I want my NuGet package to edit a web.config
file, I create a web.config.install.xdt
file. But what if I want my NuGet package to edit a web.config.debug
file?
I tried making a web.config.debug.install.xdt
file, but ran into one issue: I cannnot get the transformation to insert attributes that are themselves attributes of xdt transformation. Something like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:xdt1="http://schemas.microsoft.com/XML-Document-Transform">
<system.serviceModel >
<client xdt1:Transform="Insert">
<endpoint address="http://blah.blah" binding="basicHttpBinding" contract="Test.Contract"
name="TestWs" xdt:Transform="Replace" xdt:Locator="Match(name)"/>
</client>
</system.serviceModel>
</configuration>
(I tried changing the namespace of xdt, but that didn't help either.)