Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>To answer the title question, yes you can store settings in a separate config file, to do so you need to define the <code>configSource</code> property of <code>appSettings</code> element</p> <p>E.g.</p> <pre><code>&lt;appSettings configSource="settings.config" /&gt; </code></pre> <p>and in the settings.config file</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;appSettings&gt; &lt;add key="settingKey" value="environmentValue" /&gt; &lt;/appSettings&gt; </code></pre> <p>However, for the sake of environment specific settings, you may want to look at config transforms. Setting up a transform config for each environment then deploying to that environment with the specified build configuration.</p> <p>E.g. Web.Dev.config (provided you have setup a 'Dev' build configuration)</p> <pre><code>&lt;configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"&gt; &lt;appSettings&gt; &lt;add key="settingKey" value="devEnvironmentValue" xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/&gt; &lt;/appSettings&gt; &lt;/configuration&gt; </code></pre> <p>More details of build configuration and config transforms here: <a href="http://msdn.microsoft.com/en-us/library/dd465318%28v=vs.100%29.aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/dd465318(v=vs.100).aspx</a></p> <p>Or you could take advantage of TFS features and parameterize the environment variables, I don't have a lot of experience with this, but the following should help: <a href="http://ig.obsglobal.com/2013/02/tfs-and-continuous-deployment-part-4-parameterized-deployments/" rel="noreferrer">http://ig.obsglobal.com/2013/02/tfs-and-continuous-deployment-part-4-parameterized-deployments/</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload