"System.ArgumentNullException : Argument cannot be null" while running NUnit tests through command line

248 Views Asked by At

While running NUnit tests through command line (nunit-console.exe assemblyName.dll), ConfigurationManager is not able to read the keys from 'App.config' file hence the program is throwing "System.ArgumentNullException : Argument cannot be null"

I have also copied 'App.config' file to the path from where I am running the Nunit-console.exe

Can some body help me in this?

1

There are 1 best solutions below

0
On

After spending lot of time, finally I have got the solution in stack answer, the issue is because assemblyName.dll.config file is missing.

While running the Nunit tests from the command line, copy the dll.config along wiht the dll. That will solve the issue.