nunit-console: .config files not loaded when using an .nunit project file and --process=Multiple
Using a .nunit file to run multiple assemblies and --process=Multiple will no longer attempt to load a <TestAssemblyName>.dll.config file for each assembly, where as versions 3.7 and earlier would.
The command line i’m using is:
nunit3-console NUnitProjectFile.nunit --process=Multiple
My .nunit file is like this:
<NUnitProject>
<Settings activeconfig="Release"/>
<Config name="Release" binpathtype="Auto">
<assembly path="TestAssembly1.dll" />
<assembly path="TestAssembly2.dll" />
</Config>
</NUnitProject>
Previously this would result in the respective TestAssemblyN.dll.config being loaded for each test assembly, but this is no longer the case as of 3.8. Now the only config file that is attempted to be loaded is NUnitProjectFile.nunit.config (can be seen in SysInternals Process Explorer during a test run).
This seems to be related to the change in behaviour noted in issue #382.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 18 (16 by maintainers)
Does anyone remember when we started doing the 3.7 behavior, which is no longer there? I know that we originally required a single config file for an nunit project. See, for example this article, which I wrote in 2005.
I believe we made the change to using separate configs if a general config was not provided sometime at the start of NUnit 3 and I’d like to update the article.
This trouble of .config file not loaded also occurs with 3.10.0 when using
--process=separatecommand line argument. Not specifying the process option dodges the issue. This has been reproduced with this project and the command linenunit3-console --agents=1 --process=separate NHibernate.nunit. With 3.7.0 we were not having the issue.I’ll take a look. If it’s complicated, I’ll postpone.
Same behavior still exists in 3.11.1