【发布时间】:2018-07-19 11:52:33
【问题描述】:
我有一个具有 .NET 运行时 4.5.1 的 WPF 应用程序。它在开发机器上运行良好。
当我在 Windows 10 机器上安装并尝试启动应用程序时,它崩溃了,然后我检查了事件查看器日志,发现 .net 运行时错误如下:
Event ID : 1026
Source : .NET Runtime
Application: ABC.EXE
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Xml.XmlException
at System.Xml.XmlTextReaderImpl.Throw(System.Exception)
at System.Xml.XmlTextReaderImpl.Throw(System.String, System.String[])
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[], Int32, Int32)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Configuration.XmlUtil..ctor(System.IO.Stream, System.String,
Boolean, System.Configuration.ConfigurationSchemaErrors)
at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
Exception Info: System.Configuration.ConfigurationErrorsException
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors
(System.Configuration.ConfigurationSchemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.EnsureInit(System.String)
Exception Info: System.Configuration.ConfigurationErrorsException
at System.Configuration.ConfigurationManager.PrepareConfigSystem()
at System.Configuration.ConfigurationManager.GetSection(System.String)
at System.Configuration.ConfigurationManager.get_AppSettings()
at ABC.Application.Helpers.ResourceManager.get_DomainPath()
at ABC.Presentation.App..ctor()
at ABC.Presentation.App.Main()
【问题讨论】:
-
您的
ABC.Application.Helpers.ResourceManager.DomainPath属性获取器正在引发未处理的异常。 -
猜测一下,我们需要查看代码来配合这个。请您将其编辑到问题中吗?您可能需要及时提示,以帮助避免问题被关闭(尽管如果它仍然关闭,它可以再次重新打开)。
-
请阅读Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers? - 总结是这不是解决志愿者的理想方式,并且可能会适得其反。请不要将此添加到您的问题中。
-
您应用的配置文件中至少包含一个在 XML 上下文中无效的字符。