How to enable configSource attribute for Custom Configuration Section in .NET?

The actual file, must be placed relative to the project output folder (by default “\bin\debug” or “bin\Release”

Also, The file in your project tree, look at the properties of the file, and make sure the “Copy to Output Directory” setting is set to “Copy Always” or “Copy if Newer”

EDIT: make sure the separate config file has an xml Element header. The entire file contents should read as follows:

<?xml version="1.0" encoding="utf-8" ?>
<CustomSettings attrib1="val1" attrib2="val2" .../>

Leave a Comment