무료Tools도구들

[SourceTree] SourceTee가 갑자기 실행이 안 될 때, 다시 설치해도 안 되는 경우

saltdoll 2023. 6. 22. 14:02
반응형

소스 트리가 실행되는 같이 창이 뜨는 것 같다가 닫히면서, 제대로 실행이 안 되는 경우가 있습니다.

해당 경우는 Uninstall하고, 최신버전으로 Install 하여도 똑같은 증상이 발생할 있습니다.

 

SourceTree의 오류 로그를 보면서, 힌트를 얻을 수 있습니다.

C:\Users\ %USERNAME% \AppData\Local\Atlassian\SourceTree 폴더
오류 메시지를 출력해주는 sourcetree.log 파일

ERROR [2023-06-14 09:21:36,266]
[1] [Sourcetree.Composition.VSMef.Net48.VSMefCompositionManager] 
[Log] - Unable to load MEF components
System.InvalidOperationException: Sequence contains no elements
   at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
   at Microsoft.VisualStudio.Composition.PartDiscovery.GetElementTypeFromMany(Type type)
   at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_ImportingSiteTypeWithoutCollection()
   at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_IsLazy()
   at Microsoft.VisualStudio.Composition.RuntimeComposition.RuntimeImport.get_LazyFactory()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.SatisfyImports()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.SatisfyImmediateImports()
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveNext(PartLifecycleState nextState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.MoveToState(PartLifecycleState requiredState)
   at Microsoft.VisualStudio.Composition.ExportProvider.PartLifecycleTracker.GetValueReadyToExpose()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.<>c__DisplayClass15_0.<GetExportedValueHelper>b__0()
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportElement(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import, RuntimeExport export, Func`3 lazyFactory)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.GetValueForImportSite(RuntimePartLifecycleTracker importingPartTracker, RuntimeImport import)
   at Microsoft.VisualStudio.Composition.RuntimeExportProviderFactory.RuntimeExportProvider.RuntimePartLifecycleTracker.<CreateValue>b__10_0(RuntimeImport import)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)

 

얼마 전 6/13 윈도우 업데이트에서 .Net Framework가 변경되면서,

SourceTree에서 "Unable to load MEF components"를 읽어 올 수 없다는 메시지가 뜹니다.

 

[ 6/13/2023 윈도우  Cumulative Update for .NET Framwork .35 ...이후 오류 발생 ]

윈도우 10 - 6/14/2023 업데이트 내용이 확인됨

 

SourceTree 오류 해결법

(STEP 1) 먼저, SourceTree의 로그 설정을 지워봅니다.

(STEP 2) 최신버전의 SourceTree 재설치를 해봅니다. (STEP 1에서 해결 시 재설치가 필요 없습니다.)

 

 

(STEP 1) 먼저, SourceTree의 로그 설정을 삭제

 

파일 탐색기에서 설정값들을 가진 해당 폴더를 삭제합니다. 

설정값 삭제로 프로그램 설치하지 않고, 제대로 실행될 수도 있습니다.

C:\Users\%USERNAME%\AppData\Local\Atlassian\SourceTree.exe_Url_xx..xx

 

해당 폴더를 삭제시,  간혹 SourceTree에서 저장되었던 초기 설정값들이 다 날아갈 수도 있습니다.

만약 설정값이 다 지워졌다면,  Local 저장소 데이터를 추가 해줘서 다시 설정값을 가져올 수 있습니다. 

 

다시 설정값을 가져오기 위해서는, SourceTree의  [ Add ] 통해서 프로젝트의 설정값들을 다시 불러올 수 있습니다.

 " Add "으로 이동 => [Browse] 선택해서 폴더 선택하고, 

아래의 파란색 [ Add ] 버튼으로 추가하면 기존에 내용을 그대로 가져갑니다.

[Add]를 통해서 기존의 SourceTree의 프로젝트 Root경로 선택으로 설정을 불러올 수 있습니다.

다음 방법을 해도 실행이 안 될 때는 Step 2를 진행해 보십시오.

 

 

 

(STEP 2) 최신버전의 SourceTree 재설치

SourceTree의 최신 버전을 설치해줍니다.

기존 버전과 신규 버전 확인

(버전을 확인하다보니, 1년만에 다시 신규 버전을 설치 하게 되었네요-_-;)

SourceTree 설치파일

관리자 모드로 실행해서 설치해 줍니다.

 

관리자가 실행을 해줍니다
기본 Sourcetree 설치가 완료되고 Tools설치 단계모습

Sourcetree가 제대로 설치가 되고, Install tools 단계에서 오류가 생길 수 있습니다.

그 단계는 무시하셔도 됩니다.

Tool설치 오류 메시지

 

Step 1, 2를 하시면, 대부분 문제가 해결될 것입니다.

해당 이슈로 고생하고 있으시다면 잘 해결되셨으면 좋겠네요.

반응형
도움이 되셨다면 하트모양의 "♡ 공감"을 눌러주시면 큰 격려가 됩니다.
(로그인하지 않으셔도 가능)