gpt4 book ai didi

c# - 无法识别的配置部分 applicationSettings

转载 作者:太空狗 更新时间:2023-10-30 00:57:39 26 4
gpt4 key购买 nike

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

<?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>

最佳答案

如果它在你的开发机器上工作,那么 sectionGroup 注册有问题。您已将 applicationSettings 组注册到 System.Configuration.ApplicationSettingsGroup 类型。

检查 System.Configuration 程序集的目标机器,并确保版本与您在组注册部分中的版本相匹配。

关于c# - 无法识别的配置部分 applicationSettings,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4660744/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com