简体   繁体   English

通过命令行运行NUnit测试时出现“ System.ArgumentNullException:参数不能为空”

[英]“System.ArgumentNullException : Argument cannot be null” while running NUnit tests through command line

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" 通过命令行(nunit-console.exe assemblyName.dll)运行NUnit测试时,ConfigurationManager无法从“ App.config”文件读取密钥,因此程序将抛出“ System.ArgumentNullException:参数不能为空”

I have also copied 'App.config' file to the path from where I am running the Nunit-console.exe 我还将“ App.config”文件复制到了运行Nunit-console.exe的路径中

Can some body help me in this? 可以在这方面帮助我吗?

After spending lot of time, finally I have got the solution in stack answer , the issue is because assemblyName.dll.config file is missing. 花了很多时间之后,终于有了堆栈答案中的解决方案,问题是因为缺少assemblyName.dll.config文件。

While running the Nunit tests from the command line, copy the dll.config along wiht the dll. 从命令行运行Nunit测试时,将dll.config复制到dll中。 That will solve the issue. 那将解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM