What I'm trying to do is transform
one of appSettings
which is in external file:
Here is 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>
After build in proper configuration
which in my example is Debug
there's only this:
<?xml version="1.0"?>
<configuration>
<appSettings file="..\..\external.config">
<add key="SomeKey1" value="some value 1" />
</appSettings>
</configuration>
but it should be:
<?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>
I tryed to make shared appSettings
by 2 or more different project
1-st is WCF Service
second ASP.NET MVC 4
Application
Edited:
I've tryed to move this file
attribute
to Web.Debug.config
but it's as well doesn't work.
The question is:
How can i accomplish such thing?Is it even possible?