Do Config files provide an <include directive ??

G

Guest

What I'd like to do is have my individual .DLLs have their own App.config file tha
gets copied into the bin direrctory as MyDLL.dll.config and then in the App.confi
have an <include file="MyDLL.dll.config"> directive to pull in the additional configuratio
data

I know I'm not going to get a MyDLL.dll.config because .NET does not support that
but is there an include directive for the App.config so I can at least copy the file
by hand and get them into the configuration setting class at run time w/o havin
to actually copy the setting into App.config ??
 
G

Guest

Nothing like asking and answering your own question

I'm still not sure if the full funtionality I want will ever be supported by Microsoft (i.e. MyDLL.dll.config automaticall
copied into place along with the .dll or even better, the whole act of adding a reference to a dll will add the appropriat
element to the referencers .config), but the basic functionality I was looking for is available

MyDLL.dll.config
<?xml version "1.0" encoding="utf-8" ?><appSettings><add key="MyKey" value="MyValue" ></appSettings

App.config or Web.config
<?xml version "1.0" encoding="utf-8" ?><configuration><appSettings file="MyDLL.dll.config" /><appSettings
. . .
</appSettings

. . .
 
G

Guest

I lied, it does not work that easy :*( you cannot have two appSettings elements under <configuration> :*
oh well, back to the drawing board . .

----- lester wrote: ----

Nothing like asking and answering your own question

I'm still not sure if the full funtionality I want will ever be supported by Microsoft (i.e. MyDLL.dll.config automaticall
copied into place along with the .dll or even better, the whole act of adding a reference to a dll will add the appropriat
element to the referencers .config), but the basic functionality I was looking for is available

MyDLL.dll.config
<?xml version "1.0" encoding="utf-8" ?><appSettings><add key="MyKey" value="MyValue" ></appSettings

App.config or Web.config
<?xml version "1.0" encoding="utf-8" ?><configuration><appSettings file="MyDLL.dll.config" /><appSettings
. . .
</appSettings

. . .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top