title: nUnit tests looking for {assembly-name}.dll.config
body: <p>I have a PowerShell script that shells-out to <code>nunit-console-x86.exe</code> to run tests in assemblies ( DLLs ) that were built earlier in the script by shelling to MSBuild to compile a VS .sln</p>
  
  <pre><code>Exec { invoke-expression "$BUILD_DIR\Tools\NUnit.2.5.10.11092\nunit-console-x86.exe  $full_test_assembly_name /xml:test-results/$test_results_file_name" }
  </code></pre>
  
  <p>Some of these tests utilize <code>System.Configuration.ConfigurationManager</code> to load config settings.  <code>nunit-console-x86.exe</code> searches for these config-settings in <code>{$full_test_assembly_name}.dll.config</code> , but this file does not exist as my script does not create it (for reasons explained below).</p>
  
  <p>Each test-project .csproj includes a local App.config file.  When a test-project's tests are run in Visual Studio, nUnit searches for config settings in the local App.config. This behavior is as I expected.</p>
  
  <p>I also have an application .sln with a site/service .csproj as its startup project, plus references to various test-projects.  When I run the application .sln's entire test-suite from Visual Studio, upon running tests for any test-project nUnit searches for config settings in the test-project's local App.config.  </p>
  
  <p>This behavior is not as I expected -- I would have thought that nUnit would search the web.config located in the startup site/service .csproj.</p>
  
  <p>As an experiment, I removed App.config from one of the test-projects.  Now when I run its tests in Visual Studio, nUnit throws errors that it can't find <code>{test-project-assembly-name}.dll.config</code>.  So apparently uUnit by default looks for config settings in <code>{test-project-assembly-name}.dll.config</code>.  </p>
  
  <p>I want my test-script to invoke nUnit to run test-assembly tests so that any config settings are loaded from web.config ( which my build script copies into the build target dir ).</p>
  
  <p>How can I accomplish this ?  Can I instruct <code>nunit-console-x86.exe</code> to load config-settings from a config-file-path I supply as a parameter ?  Can I structure my .sln and/or .csproj differently so as to cause uUnit to utilize Web.config for config-settings ? </p>