Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Library.dll.config files in VS2005

1 view
Skip to first unread message

Maxwell2006

unread,
Mar 22, 2006, 11:24:19 AM3/22/06
to
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


Peter Bromberg [C# MVP]

unread,
Mar 22, 2006, 4:17:37 PM3/22/06
to
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

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

Peter Huang [MSFT]

unread,
Mar 22, 2006, 8:50:29 PM3/22/06
to
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.

0 new messages