2012-08-11 355 views
2

我的一個應用程序在XP上出現奇怪的錯誤。該應用程序是使用.NET Client 4的C#中的WPF應用程序。當應用程序啓動時,我得到錯誤,應用程序顯示UI,然後崩潰。該錯誤來自我的跟蹤日誌文件。任何人都看過?無法加載DLL UIAutomationCore.dll

Type : System.DllNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 
    Message : Unable to load DLL 'UIAutomationCore.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) 
    Source : UIAutomationTypes 
    Help link : 
    TypeName : 
    Data : System.Collections.ListDictionaryInternal 
    TargetSite : Int32 RawUiaLookupId(AutomationIdType, System.Guid ByRef) 
    Stack Trace : at MS.Internal.Automation.UiaCoreTypesApi.RawUiaLookupId(AutomationIdType type, Guid& guid) 
     at System.Windows.Automation.AutomationIdentifier.Register(AutomationIdType type, Guid guid, String programmaticName) 
     at System.Windows.Automation.InvokePatternIdentifiers..cctor() 
+1

該機器上的c:\ windows \ system32 \ uiautomationcore.dll受到重擊。通常由流氓安裝程序。從另一臺XP機器上使用.NET 4複製一個已知好的版本 – 2012-08-11 18:59:47

+0

它是否會通過重新安裝.NET 4來解決問題 – klashagelqvist 2012-08-13 08:07:39

回答

1

我搜索了同樣的問題,發現了這一點: VS2010 crashing

根據崗位有它說,你可能有UIautomation的過時的DLL。 還根據什麼帖子那裏更新從這裏的DLL:UIautomation download link 解決了這個問題。

我希望我幫助,

史記。

+0

我的應用程序包含一個安裝程序,我如何知道它的安裝程序或有問題的客戶端。該應用程序適用於大多數計算機,這表明一個工作安裝程序。 – klashagelqvist 2012-08-13 08:09:42

+0

據我所知,問題將與具體的DLL損壞。正如漢斯所說,來自另一臺計算機的好版本的dll將解決這個問題。 基本上,如果他們的dll受到損壞,其他計算機中可能會出現此問題。 爲了安全起見,也許你應該在你的安裝過程中包含該dll,並覆蓋目標計算機上已經存在的dll。 – 2012-08-15 03:29:34

0

RawUiaLookupId被UiaCoreTypesApi.UiaLookupId(type, ref guid)調用以獲得控件的Id,然後初始化AutomationIdentifier。 UiAutomationCore.dll通常用於提供程序的實現,另外您的應用程序是WPF應用程序,所以問題出在服務器端。服務器端提供者通常由系統提供服務。我不確定是否進行Windows更新可以解決問題。如果沒有,我們需要手動更新這個庫。