Library.dll.config files in VS2005

M

Maxwell2006

Hi,



I am developing a class library that uses new strongly typed .config
settings in .NET 2.0.



No I have a .DLL file and a .DLL.Config file. How can I deploy the
DLL.config file?



My main application has its own EXE.config file (or possibly web.config
file) Should I merge DLL.config with EXE.config ? Is there any way to avoid
that?



Any help would be appreciated,

Max
 
G

Guest

I'm not aware of any capabilty of .NET 2.0 to read configuration file data
natively in a DLL assembly - only an executable can do this, (or web.config
with an ASP.NET application).

You could merge the settings and they would be available to your DLL
Assembly classes, or you could get ambitious and actually write a custom
config file reader that the DLL assembly class(es) can use.
Peter
 
P

Peter Huang [MSFT]

Hi Max,

A dll will not have a config file, this is by design, because actually the
config file is per AppDomain while the dll did not have its own appdomain,
it is loaded into the Exe's default appdomain by default.

Here is link for your reference.
http://loudcarrot.com/Blogs/dave/archive/2004/06/09/269.aspx

Best regards,

Peter Huang

Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 

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