TheSwamp

Code Red => .NET => Topic started by: GEURT on November 27, 2011, 03:22:16 AM

Title: Configuration file with DLL
Post by: GEURT on November 27, 2011, 03:22:16 AM
Morning,
I had a need for a configuration file that my DLL can access and specifically in xml format. I did not want to develop a registry version nor the older .ini version for personal preferences.

Lots of research had plenty of config files attached to an .exe file , but no config files for a DLL and according to many sources, not possible. Well I chanced on this http://www.codeproject.com/Tips/199441/DLL-with-configuration-file.aspx at CodeProject and it works a charm.

Hope it can help others as well.

Cheers
Title: Re: Configuration file with DLL
Post by: mohnston on November 28, 2011, 12:15:30 PM
Another option is using "Settings".
If you are using Visual Studio go to your project properties page.
There should be a "Settings" tab.
You can add settings of various types there.
Visual Studio handles the heavy lifting but you'll get a settings file that works with your dll.
Title: Re: Configuration file with DLL
Post by: BlackBox on November 28, 2011, 01:32:29 PM
Very helpful; Thanks for sharing. :beer: