无法识别的配置部分applicationSettings

时间:2011-01-11 17:44:44

标签: c#

我的应用程序在开发PC上运行良好,但是当我在客户端PC上启动它时,我得到一个例外: “配置系统无法初始化”,内部异常msg =“无法识别的配置部分applicationSettings” 我已经检查了我的配置文件与我在互联网上找到的所有解决方案,但似乎没问题。任何想法或建议将不胜感激。配置文件在下面。

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
        <section name="KIM.Eplex.PCMU.PLayer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        <section name="EplexPCMU.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    </sectionGroup>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
        <section name="KIM.Eplex.PCMU.PLayer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
</configSections>

    <userSettings>
    <KIM.Eplex.PCMU.PLayer.Properties.Settings>
        <setting name="DataTransferPath" serializeAs="String">
            <value />
        </setting>
        <setting name="DiagnosticLockTypeIndex" serializeAs="String">
            <value>0</value>
        </setting>
        <setting name="SystemType" serializeAs="String">
            <value>2</value>
        </setting>
        <setting name="NumAuditEvents" serializeAs="String">
            <value>100</value>
        </setting>
        <setting name="AuditStartAt" serializeAs="String">
            <value>0</value>
        </setting>
    </KIM.Eplex.PCMU.PLayer.Properties.Settings>
    <EplexPCMU.Properties.Settings>
        <setting name="centre" serializeAs="String">
            <value>200, 200</value>
        </setting>
    </EplexPCMU.Properties.Settings>
</userSettings>
<applicationSettings>
    <KIM.Eplex.PCMU.PLayer.Properties.Settings>
        <setting name="DiffProgEnabled" serializeAs="String">
            <value>0</value>
        </setting>
    </KIM.Eplex.PCMU.PLayer.Properties.Settings>
</applicationSettings>
</configuration>

1 个答案:

答案 0 :(得分:6)

如果它适用于您的开发计算机,则sectionGroup注册存在问题。您已将applicationSettings组注册到类型System.Configuration.ApplicationSettingsGroup

检查目标计算机上的System.Configuration程序集,并确保该版本与sectionGroup注册中的版本匹配。