If an assembly contains an app.config file, ConfigurationManager will load it as long as it is in the same directory as the NUnit project that is executing through NUnit-Gui. To illustrate consider the following folder structure.
+ TestFolder
testProject.nunit
+ AssemblyAFolder
assemblyA.dll
assemblyA.dll.config
+ AssemblyBFolder
assemblyB.dll
assemblyB.dll.config
Both AssemblyA and AssemblyB exercise code that calls into ConfigurationManager. If I run these test assemblies independently in NUnit-Gui, ConfigurationManager will correctly resolve the local configuration files.
However, if I load testProject.nunit into NUnit-Gui (which contains references to both AssemblyA and AssemblyB), ConfigurationManager looks for the configuration file in TestFolder regardless of which assembly is currently executing.
Is there a way to direct NUnit to reload the application configuration to the one present in the current assembly's directory?
Here are the contents of testProject.nunit:
<NUnitProject>
<Settings activeconfig="Debug" />
<Config name="Debug" binpathtype="Auto">
<assembly path="AssemblyAFolder\assemblyA.dll" />
<assembly path="AssemblyBFolder\assemblyB.dll" />
</Config>
</NUnitProject>