【问题标题】:"System.ArgumentNullException : Argument cannot be null" while running NUnit tests through command line通过命令行运行 NUnit 测试时出现“System.ArgumentNullException:参数不能为空”
【发布时间】:2017-07-13 11:00:57
【问题描述】:

通过命令行 (nunit-console.exe assemblyName.dll) 运行 NUnit 测试时,ConfigurationManager 无法从“App.config”文件中读取密钥,因此程序抛出“System.ArgumentNullException : Argument cannot be null "

我还将“App.config”文件复制到运行 Nunit-console.exe 的路径

有人可以帮助我吗?

【问题讨论】:

    标签: c# nunit nunit-console pnunit


    【解决方案1】:

    花了很多时间,终于在stack answer找到了解决方案,问题是因为缺少assemblyName.dll.config文件。

    从命令行运行 Nunit 测试时,将 dll.config 与 dll 一起复制。这将解决问题。

    【讨论】:

      猜你喜欢
      • 2022-11-21
      • 1970-01-01
      • 1970-01-01
      • 2011-01-03
      • 1970-01-01
      • 2016-11-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多