Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy won't the appSettings file attribute allow a path to the parent directory?
    text
    copied!<p>I'm trying to deploy a project with multiple executables, some of which use a common config file. I'd like to have this common config file in its own directory. The problem is that it keeps getting ignored. I have the tag:</p> <pre><code>&lt;appSettings file="..\Common Configs\Common.config"&gt; </code></pre> <p>in some of the executable-specific config files. If I copy the Common.config file to the same directory as the specific config file, and remove the path from the tag, everything works. It even works if I do something like: </p> <pre><code>&lt;appSettings file="..\App1\Common.config"&gt; </code></pre> <p>where <code>App1</code> is the folder the executable lives in.</p> <p><a href="http://connect.microsoft.com/VisualStudio/feedback/details/93626/configsource-attribute-on-config-sections-doesnt-support-parent-or-absolute-config-paths" rel="nofollow">This page</a> suggests that the <code>ConfigSource</code> doesn't allow paths to the parent, but the <code>file</code> attribute does.</p> <p>To further complicate matters, I'm deploying to a file share, so I can't create hard links in the exe folders.</p> <p>Does anyone know why this doesn't work? How else can I deploy this with a shared config file?</p> <p>The folder structure has the following form:</p> <p>Solution </p> <ul> <li><p>Common Configs</p> <ul> <li>Common.config</li> </ul></li> <li><p>App1 </p> <ul> <li><p>App1.exe </p></li> <li><p>App1.exe.config </p></li> </ul></li> <li><p>App2</p> <ul> <li><p>App2.exe</p></li> <li><p>App2.exe.config</p></li> </ul></li> </ul>
 

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