The default values are built into the .dll file. You can of course still change those settings, but you do that in the program.exe config instead by referring to the assembly settings with a section in configSections
/sectionGroup
. The assembly settings can then be changed in the applicationSettings
by creating a XML block with the same name as the section.
The section tag in the section group can simply be copied from the app.config file of your assembly project. That way the token, name, etc. will be correct. The same goes for the applicationSettings part. Just copy it from the app.config in the assembly project and into the app.config file of the program.exe project.
example program.exe.config:
<configuration>
<configSections>
... references to all dll settings ...
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="MyAssemblyNamespace.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
... more config stuff...
<applicationSettings>
... override your dll settings ...
<MyAssemblyNamespace.Properties.Settings>
<setting name="MaxUserNameLength" serializeAs="String">
<value>100</value>
</setting>
</MyAssemblyNamespace.Properties.Settings>
</applicationSettings>