有没有办法让NuGet包转换配置转换文件?例如,当我想让我的NuGet包编辑web.config
文件时,我创建了一个web.config.install.xdt
文件。但是如果我想让我的NuGet包编辑web.config.debug
文件呢?NuGet包转换配置转换文件
我试着制作一个web.config.debug.install.xdt
文件,但遇到了一个问题:我无法获得转换以插入本身属于xdt转换的属性。喜欢的东西:
<?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>
(我试图改变XDT的命名空间,但是这并没有帮助)
相关:http://stackoverflow.com/q/30945716/38368 –
我已将[问题](http://blog.nuget.org/20130920/how-to-use-nugets-xdt-feature -examples-and-facts.html)关于这个在nuget博客。 –