Config files for dll's


S

Sinex

Hi,
I have a main windows application (exe). This has its own app config file.
I also have a few DLL' s that this app will use. I want to store information
specific to the DLL's in their own config files. Is this possible? If so,
how?

...Sinex
 
Ad

Advertisements

G

Glenn

Sinex

I came across a similiar problem with a recent project where the DLL's could
be used in both a web and windows context.
What I decided to do was continue to use XML to define the configuration for
the assembly. First thing I did was to create a XSD with the necessary
complex types to define how the configuration should look. From this I
created, using the xsd.exe tool, a .cs file to hold the deserialised data.

The good thing about it was that whenever I wanted some configuration
information, all I needed to do was deserialise the XML to the .cs file that
had been generated from the schema definition and all the config is
available thru intellisense.

HTH

Glenn
 
Ad

Advertisements

I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

There is nothing in the framework for this, you could use a text file with
lines like var=value or use a XML with a similar structure of the config
files and parse it in your dll


Cheers,
 

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