从测试项目的类中(例如,使用nunit)调用读取了app.config的项目的类函数 [英] From a testproject's class (eg using nunit) Call on a project's class function that read's app.config
本文介绍了从测试项目的类中(例如,使用nunit)调用读取了app.config的项目的类函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我从项目中读取app.config时,将找到app.config部分.
但是,当我从另一个项目(显然是在另一个名称空间中)调用此功能时,例如使用nunit,则找不到该部分.
我想念她什么?
问候
古托姆·哈弗森
克里斯蒂安桑
挪威
When I read app.config from within the project, the app.config section is found.
But when I call on this functionality from another project (in another namespace obviously) eg using nunit, the section is not found.
What am I am missing her ?
Regards
Guttorm Haaversen
Kristiansand
Norway
推荐答案
难怪,因为这是一个不同的过程-不同的入口程序集;app.config
已为每个应用程序创建和使用.
(顺便说一下,名称空间并不重要.)
No wonder, because this is a different process -- different entry assembly;app.config
is created and used per application.
(Name spaces don''t matter, by the way.)
这篇关于从测试项目的类中(例如,使用nunit)调用读取了app.config的项目的类函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文