从另一个项目访问在app.config值 [英] Accessing the app.config values from another project

查看:110
本文介绍了从另一个项目访问在app.config值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的解决方案两个可执行的项目。一个是主节目,而另一只被成功安装后跑。主要程序(REase)有有,其他程序需要的connectionString(DBUpdater)的app.config文件。

I have two executable projects in my Solution. One is the primary program, and the other is only ran after a successful installation. The primary program (REase) has an app.config file that has the connectionString that the other program needs (DBUpdater).

如何的dbupdate访问的app.config为REase?

How can DBUpdate access the app.config for REase?

推荐答案

您可以使用的方法<一href="http://msdn.microsoft.com/en-us/library/system.configuration.configurationmanager.openmappedexeconfiguration.aspx"相对=nofollow> OpenMappedExeConfiguration 如果REase app.config文件名是由DBUpdater知道。

You could use the method OpenMappedExeConfiguration if the app.config file name for REase is known by DBUpdater.

这篇关于从另一个项目访问在app.config值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆