问题描述
我正在努力了解app.config和user.config设置的工作方式(2.0方式),当我在一个项目中工作时,一切都很好.但是,我将需要一种在多个项目之间共享app.config和user.settings的方法.
例如,当我在"ProjectB"中时,我需要访问名称空间"ProjectA"设置...
ProjectA.Properties.Settings.Default.someVar;
问题在于,它一直在说由于无法访问而无法访问设置"它的保护级别.我不明白为什么我添加的ProjectA是ProjectB的项目依赖项,并添加了对ProjectA命名空间的引用,为什么我不能看到"设置?
感谢您的支持任何帮助.
I'm working on understanding how the app.config and user.config settings work (2.0 way), and everything is fine when I'm working in one project. I'm going to need a way, though, to share the app.config and user.settings across mulitple projects.
So for example when I'm in "ProjectB" I need to access the namespace "ProjectA" settings...
ProjectA.Properties.Settings.Default.someVar;
The problem is it keeps saying that it can't accesss Settings in accessible due to its protection level. I don't see why if I've added ProjectA is a project dependency for ProjectB and added the reference to the ProjectA namespace, why I can't 'see' the Settings?
Thanks for any help.
推荐答案
这篇关于如何在解决方案中的多个项目之间共享2.0应用程序/用户设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!