標籤:ima 工具 atl .net most www rtu 參與 finish
簡介
SourceTree 是一款擁有可視化介面的項目版本控制軟體,適用於git專案管理,同時它整合了 git flow 工作流程,對於不熟悉 git 命令的初學者來說,可以通過 SourceTree 快速學會使用 Git 和 git flow 來參與代碼版本管理和團隊協作開發。
問題
今日在全新的一台 win10 電腦上安裝 SourceTree (2.3.1.0) 時沒有安裝成功,也沒有任何錯誤提示,雙擊安裝檔案後,出下後,並未成功安裝。
解決
經過 Google 後在 Stack Overflow 上發現這個問題: Source Tree doesn‘t launch after installation
Cause
The most likely reason for this error is that the user.config file for SourceTree has been corrupted. You can confirm this by locating the file in this location: C:Users<User>AppDataLocalAtlassianSourceTree.exe_<random_string><version_number>
If this is the cause, when you open the file, it will be full of <NULL> values.
Resolution
If the user.config file is indeed corrupted, you may delete it. It will be regenerated the next time you start SourceTree, and the application should start normally.
看起來解決辦法就是刪除 C:\Users\<User>\AppData\Local\Atlassian\SourceTree.exe_<random_string>\<version_number> 下的user.config 後重新安裝
按照上述辦法嘗試後發現仍然無效,所以只有另外想辦法。
自己做過四年的 .NET 開發,跑到了C:\Users\<User>\AppData\Local\Atlassian\SourceTree 目錄下看了 sourcetree.log 日誌資訊:
ERROR [2018-03-17 20:27:06,785] [3] [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopiedERROR [2018-03-17 20:27:07,491] [4] [SourceTree.App] [OnStartup] - Failed to startSystem.NullReferenceException: 未將對象引用設定到對象的執行個體。 在 SourceTree.Notifications.NotificationsManager.SetOwner(NotificationDialogWindow notificationWindow) 在 SourceTree.Notifications.NotificationsManager.ShowNotificationDialog[T](NotificationDialogWindow notificationWindow, Tuple`2 customAction, VistaTaskDialogIcon icon) 在 SourceTree.Notifications.NotificationsManager.ShowNotificationDialog[T](String title, String message, Tuple`2 customAction, String cancelLabel, String suppressionSetting, Action`1 suppressionChangedAction, Object contentControl, String contentCommandLabel, Action contentAction) 在 SourceTree.Notifications.NotificationsManager.ShowNotificationDialogWithYesConfirmation(String title, String message, String details) 在 SourceTree.Configuration.WpfSpellCheckerPreFlightCheck.Run() 在 SourceTree.AppRoot.RunPreFlightChecks() 在 SourceTree.AppRoot.OnStartup(StartupEventArgs e) 在 SourceTree.App.OnStartup(StartupEventArgs e)
哈哈,發現了 Wpf 的身影,自己還在 10 年左右用 WPF 開發過應用,很親切的感覺。
既然是微軟系技術做的工具,肯定是需要 .NET Framework 支援的,因此跑去微軟官網 https://www.microsoft.com/net... 重新安裝最新的 .net framework.
然後重新安裝 SourceTree 就恢複正常了。
SourceTree Win10 安裝不成功解決過程記錄