title: Using App.config for path to folder
body: <p>I have the following code</p>
  
  <pre><code>System.Diagnostics.Process proc = new System.Diagnostics.Process();
  proc.StartInfo.FileName = "build.bat";
  proc.StartInfo.WorkingDirectory = "C:\\Build";
  proc.Start();
  </code></pre>
  
  <p>and I wanted to move the <code>WorkingDirectory</code> to <code>app.config</code></p>
  
  <pre><code>&lt;appSettings&gt;
    &lt;add key="buildPath" value="C:\\Build" &gt;&lt;/add&gt;
  &lt;/appSettings&gt;
  </code></pre>
  
  <p>with the new code:</p>
  
  <pre><code>string buildPath = ConfigurationManager.AppSettings["buildPath"];
  System.Diagnostics.Process proc = new System.Diagnostics.Process();
  proc.StartInfo.FileName = "build.bat";
  proc.StartInfo.WorkingDirectory = buildPath;
  proc.Start();
  </code></pre>
  
  <p>But it seems that the application can't find the path. </p>
  
  <blockquote>
    <p>The system cannot find the file specified.</p>
  </blockquote>
  
  <p>What is configuration doing behind the scene?</p>