語境
我使用多年前撰寫的 WinForms/C# .NET 實用程式(我無法在此分享)。它總是在我的任何計算機上按預期啟動。除了某些舊版本的 .NET Framework 之外,它沒有任何特定的依賴項。該軟體多年來沒有更改,我最近沒有對系統進行任何更改。
問題 - 第 1 部分
我通過輔助計算機上的遠程桌面使用此實用程式。我不確定發生了什么,但是 explorer.exe 崩潰了,我不得不重新啟動計算機。
從那時起,該實用程式不再在該計算機上啟動。我的意思是,當我單擊/雙擊其圖示時,滑鼠游標會短暫顯示“加載”狀態,然后什么也沒有。它仍然可以在其他計算機上完美運行。
感覺這臺給定的計算機決定阻止給定的實用程式?(我完全不確定,這是現在計算機可以做的事情嗎?)
我該如何診斷和解決這個問題?
注意:我在將其發布到 SuperUser 之間猶豫不決,因為這看起來像一個系統問題并在此處發布,但它看起來像是一個非常特定于 .NET Framework 的問題,因此我將其發布在這里
已經嘗試過的事情
- 我嘗試卸載并重新安裝該應用程式。
- 該系統受 Nod32 AntiVirus 保護,但我沒有跡象表明它與該問題有關。我嘗試關閉防病毒軟體,但這并沒有改變任何東西,應用程式仍然無法啟動。
- 我當然嘗試重新啟動計算機。
問題 - 第 2 部分
在 Windows 10Event Viewer > Windows Logs > Applications
中,我找到了以下條目(隨后是 3 個其他相關條目,但這個似乎最相關)。這個系統似乎是一個反復出現的問題Xml parsing
?在決議應用程式配置的時候?(即使在重新安裝應用程式之后。)這是怎么回事?我該如何解決?
Application: [MyApplication].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.ParseText(Int32 ByRef, Int32 ByRef, Int32 ByRef)
at System.Xml.XmlTextReaderImpl.ParseText()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at
System.Configuration.XmlUtil.StrictReadToNextElement(System.Configuration.ExceptionAction)
at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(System.Configuration.XmlUtil, System.String, Boolean, System.String, System.Configuration.OverrideModeSetting, Boolean)
at System.Configuration.BaseConfigurationRecord.ScanSectionsRecursive(System.Configuration.XmlUtil, System.String, Boolean, System.String, System.Configuration.OverrideModeSetting, Boolean)
at System.Configuration.BaseConfigurationReco
rd.ScanSections(System.Configuration.XmlUtil)
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.ClientConfigurationSystem.OnConfigRemoved(System.Object, System.Configuration.Internal.InternalConfigEventArgs)
Exception Info: System.Configuration.ConfigurationErrorsException
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(System.Object, System.Configuration.Internal.InternalConfigEventArgs)
at System.Configuration.Internal.InternalConfigRoot.OnConfigRemoved(System.Configuration.Internal.InternalConfigEventArgs)
at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(System.String, System.Configuration.BaseConfigurationRecord)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)
at System.Configuration.BaseConfigurationRecord.GetSection(System.String)
at System.Configuration.ConfigurationManager.GetSection(System.String)
at System.Configuration.ClientSettingsStore.ReadSettings(System.String, Boolean)
at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(System.Configuration.SettingsContext, System.Configuration.SettingsPropertyCollection)
at System.Configuration.SettingsBase.GetPropertiesFromProvider(System.Configuration.SettingsProvider)
at System.Configuration.SettingsBase.GetPropertyValueByName(System.String)
at System.Configuration.SettingsBase.get_Item(System.String)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(System.String)
at System.Configuration.ApplicationSettingsBase.get_Item(System.String)
at [MyApplication].UI.WinForms.Properties.Settings.get_UnrarExePath()
at [MyApplication].Archive_tester_main_Form..ctor()
at [MyApplication].Program.Main()
我已經檢查了應用程式啟動沒有任何問題的計算機,在另一臺計算機上沒有這樣的條目。
下一個想法 我懷疑這個 XML 存盤在系統的某個地方,但我不確定在哪里。它似乎不是應用程式檔案夾中的 .config 檔案。
uj5u.com熱心網友回復:
組態檔有時會損壞,并在設定加載時給出這樣的例外。例如看這個問題。可能您的卸載程式沒有洗掉用戶設定并且它一直處于損壞狀態。
在 AppData(在您的應用程式目錄中)中查找 user.config 并查看它的外觀。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/506405.html
上一篇:根據選擇有限的復選框更改行顏色