ビジュアルスタジオ(web.config変換)では、ルート要素に2つの属性を追加する変換があります。 1つのアトリビュートが機能します(複数のアトリビュートは動作しません)。 子要素に複数の属性を設定できます。 私は属性の名前を指定して、指定せずにSetAttributesを試しましたが、運はありません。web.config変換を使用してルートelemementに複数の属性を設定する
アイデア??
例
<element xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xdt:Transform="SetAttributes" attrOne="One" attrTwo="Two">
<children>
<child name="One" xdt:Transform="SetAttributes" attrOne="One" attrTwo="Two" />
</children>
</element>
望ましい効果
<element attrOne="One" attrTwo="Two">
<children>
<child name="One" attrOne="One" attrTwo="Two" />
</children>
</element>
"要素" セクションには、そうのような...本当にweb.configファイルのカスタムセクションです:
<configuration>
... <element configSource="App_Data\element.config" />
this t
<element xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xdt:Transform="Replace" attrOne="One" attrTwo="Two">
<children>
<child name="One" attrOne="One" attrTwo="Two" />
</children>
</element>
しかし、このことを行います:
<element xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform" xdt:Transform="Replace" attrOne="One">
<children>
<child name="One" attrOne="One" attrTwo="Two" />
</children>
</element>
ransformationを更新は、これは明らかにどちらか動作しません
(スローチーターを使用して)element.configファイルで使用されることを意味しています
ルート要素に2つ以上の属性があるとすぐに失敗します。
、申し訳ありません、それは自己web.configファイルではないと言うことを意味しますが、このショーそのカスタムセクション。しかし、SetAttributesは1つの属性では動作しますが、2つでは動作しません...ルート要素では面白いです –