你如何加载app.config文件到DLL加载、文件、config、app

由网友(-悲伤逆流成河)分享简介:所以,我无法找到一个明确的答案的问题。你如何加载app.config文件到DLL。So I cant find a definitive answer to the Question. How do you load the app.config file into a DLL.据我所知,一般的App.confi...

所以,我无法找到一个明确的答案的问题。你如何加载app.config文件到DLL。

So I cant find a definitive answer to the Question. How do you load the app.config file into a DLL.

据我所知,一般的App.config信息应放入可执行文件的app.config。但是我建立一个加载项并有可执行可用。

I understand that generally the App.config info should be put into the executable app.config. However i am building an add-in and have to executable available.

我想用namespace.dll.config文件来存储我的变量,但我需要加载到系统的一种方式。

I would like to use the namespace.dll.config file to store my variables, but i need a way of loading it into the system.

你需要打造出了一些code加载该文件? 您可以使用ConfigurationManager的命名空间来做到这一点很容易?

Do you need to build out some code to load this file in? Can you use the configurationManager namespace to make this happen easily?

推荐答案

在这样做的方法是你要提供你的assembly.dll.config消费者的组装。然后,他们应该将这些项目纳入其应用程序的配置文件。

The way this is done is that you should supply your assembly.dll.config to consumers of your assembly. They should then incorporate those entries into their application's config file.

您大会将能够通过正常途径来访问这些值。

Your assembly will then be able to access those values through normal means.

阅读全文

相关推荐

最新文章