C#应用程序未在单个PC上启动

时间:2018-10-12 23:14:47

标签: c# startup

我有一个可以在大量PC上运行的应用程序。在单台计算机中,它不会启动,并且Windows事件查看器会生成以下日志(由客户端发送给我):

  

日志名称:应用程序源:.NET运行时日期:
  11/10/2018 17:00:31事件ID:1026任务类别:无级别:
  错误关键字:经典用户:N / A计算机:PCName   说明:应用程序:MyApp.exe框架版本:v4.0.30319   说明:由于未处理的异常,进程已终止。   异常信息:System.Configuration.ConfigurationErrorsException
  在   System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(布尔)   在   System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(System.Configuration.ConfigurationSchemaErrors)   在System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
  在   System.Configuration.ClientConfigurationSystem.EnsureInit(System.String)

     

异常信息:System.Configuration.ConfigurationErrorsException
  在System.Configuration.ConfigurationManager.PrepareConfigSystem()处
  在System.Configuration.ConfigurationManager.GetSection(System.String)   在   System.Xml.Serialization.TempAssembly.get_UseLegacySerializerGeneration()   在   System.Xml.Serialization.TempAssembly.ctor(System.Xml.Serialization.XmlMapping [],   System.Type [],System.String,System.String,   System.Security.Policy.Evidence)   System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(System.Xml.Serialization.XmlMapping [],   System.Type)位于   System.Xml.Serialization.XmlSerializer.FromMappings(System.Xml.Serialization.XmlMapping [],   System.Type)位于   System.Web.Services.Protocols.SoapClientType..ctor(System.Type)在   System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()在   CrashReporterDotNET.com.drdump.HttpsCrashReporterReportUploader..ctor()   在CrashReporterDotNET.DrDump.DrDumpService..ctor()在   CrashReporterDotNET.CrashReport.SendAnonymousReport()位于   CrashReporterDotNET.CrashReport..ctor(CrashReporterDotNET.ReportCrash)   在CrashReporterDotNET.ReportCrash.Send(System.Exception)在   MyApp.App.ReportCrash(System.Exception,System.String)在   MyApp.App.CurrentDomainOnUnhandledException(System.Object,   System.UnhandledExceptionEventArgs)

相似的线程无关,因为发现我的app.config文件不同。

编辑:这是我的app.config文件:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
      <section name="MyApp.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.29.0" newVersion="2.2.29.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-2.2.29.0" newVersion="2.2.29.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <userSettings>
    <MyApp.Properties.Settings>
      <setting name="MySettings1" serializeAs="String">
        <value>1</value>
      </setting>
      ........
      ........
      <setting name="MySettings15" serializeAs="String">
        <value>False</value>
      </setting>
    </MyApp.Properties.Settings>
  </userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /></startup></configuration>

0 个答案:

没有答案