如果你在你的代码中使用了 ConfigurationSettings.GetConfig 获取app.config里面的设置的话,在单元测试中,你必须把.config文件拷贝到单元测试程序集所在dll里并且命名为 <test assembly's name>.dll.config,否则单元测试时将无法读取配置文件里面的信息。

相关文章:

  • 2022-01-16
  • 2022-01-11
  • 2021-12-19
  • 2021-07-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
  • 2022-12-23
猜你喜欢
  • 2021-09-09
  • 2021-12-06
  • 2022-03-06
  • 2022-12-23
  • 2022-12-23
  • 2021-04-14
相关资源
相似解决方案