title: How to use app.config with ilmerge executable
body: <p>My merge project combines a few custom dll's with an executable. I have done the merge with both command line ilmerge utility, and IL Merger Tool but have yet to get the config part working.</p>
  
  <p>My exe uses using <code>System.Configuration</code> to read in a connection string, like so:</p>
  
  <p><code>DataAccess da = new DataAccess(ConfigurationManager.ConnectionStrings["MyDb"].ProviderName,                                         ConfigurationManager.ConnectionStrings["MyDb"].ConnectionString);</code></p>
  
  <p>When trying to run the produced executable, it bombs on the above line with the following error <code>Object Reference not set to an instance of object</code>.</p>
  
  <p>I am assuming this is because the merged executable can't find the config file. </p>
  
  <p>If that is the case, what do I need to do to ensure the config file is wired in? </p>
  
  <p>If not, what else could the issue be? By the way, the unmerged executable works fine in debug.</p>