How To Fix Sourcetree Unable To Load MEF Components

Are you facing an issue in starting Sourcetree and cannot pull the files from Git?

Don’t worry! You have come to the correct place.

Sourcetree is a free GUI client for Windows and Mac that provides developers with a User-friendly environment to work on Git repositories.

Users can pull files easily without inputting the command lines.

However, After the recent Windows Update, many users encounter the issue with Sourcetree with the following error message:

“[Sourcetree.Composition.VSMEF.Net48.VSMEFCompositionManager] [Log] – Unable to Load MEF Components”

In this article, you will understand why the error occurs and how to fix it step by step.

Why Is Sourcetree Unable To Load MEF Components?

Why Is Sourcetree Unable To Load MEF Components error

The error Unable to load MEF components could occur due to the recent Windows update, some Windows OS files or System Settings being modified, and the Sourcetree application file being damaged or corrupted.

The error usually occurs when there is an issue with the installation or configuration of Sourcetree’s MEF components. 

In addition, The recent Windows update may disturb or change the flow of the Windows application process, which results in issues with opening the program files on Windows.

The primary reasons why this error may occur are:

  • Corrupted update files.
  • The update could break the installation.
  • Misconfigured settings.

How To Fix The Sourcetree Unable To Load MEF Components?

It is common to have such technical hitches in certain applications after the new rollout of OS, but don’t worry; it can be fixed simply by following the easy troubleshooting steps.

1. Restart Your Computer

If the error occurs, the first step is to restart your computer.

A quick restart can alleviate temporary difficulties with the application or its dependencies. 

So restart your computer and relaunch the Sourcetree application to see if the error is gone.

2. Clear Cache Files From Atlassian Folder

If the error persists, you need to clear the cache files in the Atlassian folder.

Why is sourcetree unnable to load MEF components deleting the source file

To clear the current Update, follow the below steps.

Why Is Sourcetree Unable To Load MEF Components delete files
  • Press the Windows+R keys to open Run Command Box.
  • Type %localappdata% in the input box and press enter
  • The local folder path will open.
  • Locate and double-click on Atlassian Folder
  • Go to Sourcetree.exe_Url_o1dwl2lzyvz0mrmoflvi00ioor4plpl2 folder
  • Open the Version folder and delete the following files: Assemblies. Cache and Composition. Cache.

 If the error occurs again, check the folder version numbers.

3. Check The Version Number In The Sourcetree And Atlassian Folder

Sometimes mismatching of version names in Sourcetree and Atlassian folders might cause the error.

Follow the steps Check the folder name.

  • Press the Windows+R keys to open Run Command Box.
  • Type %localappdata% in the input box and press enter
  • The local folder path will open.
  • Locate and double-click on Atlassian Folder
  • Go to Sourcetree.exe_Url_o1dwl2lzyvz0mrmoflvi00ioor4plpl2 folder
  • Check the version number.
Why Is Sourcetree Unable To Load MEF Components Atlassian folder name 1

Then return to the Local folder, scroll down, and find the Sourcetree folder.

Why Is Sourcetree Unable To Load MEF Components Sourcetree foldername

Check the version number in the app-[version number folder].

The Version numbers differs in the example image.

Here the version number is 3.4.13.0 in the Atlassian folder and the version number is app-3.4.13 in the Sourcetree folder. Follow the below steps.

  • Rename the folder to app-3.4.13.0 (add 0).
  • Launch the Sourcetree application. 
  •  Do not complete the registration process. Instead, press Ctrl+Shift+Esc to open the task manager.
  •  Kill the source tree process from the Task Manager.
  • Again Go to a local folder and Change the folder name back to app-3.4.13.
  • Now launch the Sourcetree application, and it will work fine.

If the folder names are the same, follow the next solution.

4. Uninstall And Install The Previous Version Of Sourcetree

Some users reported that the issue reappears, and the above fix has to be applied repeatedly. So downgrading the source tree application to 3.4.12 fixed the issue.

Why Source tree unable to load mef components drwongrdade version
  • In the Windows search bar, Type Add or Remove Programs and Click on it from the search list.
  • Scroll down to find the Sourcetree Application.
  • Click on it and Tab on Uninstall.

Now the Sourcetree application has been removed Successfully.

Why Is Sourcetree Unable To Load MEF Components downgrades
  • Go to Sourcetree’s Git official website and download the setup file.
  • Once the download is completed, right-click on it and run as administrator to install it.

Now configure your Git account with Sourcetree and try to pull the repositories.

You will see the application is working fine without any issues.