The Type Initializer For 'LibGit2Sharp.Core.NativeMethods' Threw An Exception

While trying to clone an empty Git repository, error "The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception" is thrown.

Issue Description:
While trying to clone an empty Git repository, getting the error "The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception".

Root Cause:
This error is thrown when a dependency Dlls for the Github integration is missing.

Resolution:

  1. Open “Run” and enter in “appwiz.cpl”.
  2. Click OK. This will open Add/Remove programs.
  3. Search for “Redistributable”
  4. Go to the following link to see our system requirements depending on the studio/robot version: Studio Software Requirements

  1. It might be required to change the version of UiPath, if the instances being investigated is not the latest version.
  2. Check to see what version of Microsoft Visual C++ 2015 Redistributable is required for the specific studio version.
  3. Microsoft redistributable can be downloaded and installed from the Microsoft repository link Latest supported Visual C++ Redistributable downloads | Microsoft Learn.
  4. If any other software prerequisite components are missing, make sure to install them.

  1. If all software components are installed, open a ticket with UiPath Support so that additional troubleshooting can be done.