Converting configSource attributes to Web.config appSettings

I am trying to update the configSource attribute of the appSettings element in my.config file using web.config conversions.

I have the following in my web.config

    <appSettings configSource="Config\appSettings.local.config">
    </appSettings>

I want it to be

    <appSettings configSource="Config\appSettings.prod.config">
    </appSettings>  

when i create release. This is not happening. I have the following in my Web.Release.config in an element

    <appSettings xdt:Transform="SetAttributes(configSource)" configSource="Config\appSettings.prod.config" />
+5
source share
2 answers

Conversions occur only when you deploy a web application (or create a deployment package). This does not happen when you are just building a solution.

http://msdn.microsoft.com/en-us/library/dd465326.aspx

" - ASP.NET , () Web.config ."

+13

All Articles