私がやろうとしているのは、そのtransform
うちの1つがappSettings
外部ファイルにあります:
これがexternal.configです
<?xml version="1.0"?>
<appSettings>
<add key="SomeKey" value="some value" />
</appSettings>
Web.config
<?xml version="1.0"?>
<configuration>
<appSettings file="..\..\external.config">
<add key="SomeKey1" value="some value 1" />
</appSettings>
</configuration>
Web.Debug.config
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<add key="SomeKey" value="some changed value"xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
</appSettings>
</configuration>
適切にビルドした後configuration
、私の例ではDebug
これだけがあります:
<?xml version="1.0"?>
<configuration>
<appSettings file="..\..\external.config">
<add key="SomeKey1" value="some value 1" />
</appSettings>
</configuration>
ただし、次のようにする必要があります。
<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<add key="SomeKey1" value="some value 1" />
<add key="SomeKey" value="some changed value"/>
</appSettings>
</configuration>
appSettings
2つ以上の異なるもので共有しようとしましたproject
1番目がWCF Service
2番目ですASP.NET MVC 4
Application
編集:
これをに移動しようとしましfile
attribute
たWeb.Debug.config
が、うまくいきません。
質問は:
どうすればそのようなことを達成できますか?それは可能ですか?