Sourcetree starts up for about 5 seconds in task manager, then exits silently. Have tried uninstalling, reinstalling including clearing the AppData folders. Also tried installing an older version but that too force closes. Note: this issue is related to this specific machine, 2.3.5 is working on another machine of mine.
Here is the log:
ERROR [2017-10-27 11:14:54,334]  [SourceTree.App] [.ctor] - finish EnsureSquirrelExecutionStubIsCopied
ERROR [2017-10-27 11:14:54,490]  [SourceTree.App] [OnStartup] - Failed to start
System.TypeInitializationException: The type initializer for 'MS.Win32.Penimc.UnsafeNativeMethods' threw an exception. ---> System.Runtime.InteropServices.COMException: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
--- End of inner exception stack trace ---
at MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr& handle)
at System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(PenContext penContext)
at System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(InputManager inputManager, PresentationSource inputSource)
at System.Windows.Interop.HwndStylusInputProvider..ctor(HwndSource source)
at System.Windows.Interop.HwndSource.Initialize(HwndSourceParameters parameters)
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
at System.Windows.Window.ShowHelper(Object booleanBox)
at SourceTree.Utils.GeneralHelper.DownloadFile(String url, String destLocation, IInteractionsManager interactionsManager, IWebManager webManager, IDispatcher dispatcher, IRepoProcessFactory repoProcessFactory, INotificationsManager notificationsManager, String extractLocation)
at SourceTree.Download.DefaultDownloadManager.DownloadFile(String url, String downloadDestination, String extractionDestination)
at SourceTree.AppRoot.OnStartup(StartupEventArgs e)
at SourceTree.App.OnStartup(StartupEventArgs e)
Since you only see this on a specific machine, you may want to checkout this and see if it helps:
Thanks for the response, the link contained in there got me to the right area to get it working again.
My final solution:
open cmd with admin rights
browse to C:\Windows\Microsoft.NET\Framework64\v4.0.30319\WPF
and run the command:
Source tree now loads after installation
A vulnerability has been published today in regards to Sourcetree for Windows. The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event