Is there a way to have the main .net configuration file app.config/web.config include another configuration file? I have a need to keep things in separate files, but link them together.
Here is a sample of what I want to include:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="LocationSearch.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<LocationSearch.Properties.Settings>
<setting name="MapQuestApiKey" serializeAs="String">
<value>some value here...</value>
</setting>
<setting name="MapQuestClientCode" serializeAs="String">
<value>another value here...</value>
</setting>
</LocationSearch.Properties.Settings>
</applicationSettings>
</configuration>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…