Unable to use Git

Hi! I’m currently facing an issue while trying to use git. It says I’m missing a DLL or one of it’s dependencies. I do have the git2-572e4d8.dll mentioned on the error message and the DLL is in the correct path, so I guess the error is somewhere else.


I’m getting this error while trying to clone a repo.

Finally, the error log thrown:

21.4.3+Branch.master.Sha.7d66317b828533c43b8fc299ec1cfdc22a138bc2

The type initializer for ‘LibGit2Sharp.Core.NativeMethods’ threw an exception.

Error: System.TypeInitializationException: The type initializer for ‘LibGit2Sharp.Core.NativeMethods’ threw an exception.
—> System.DllNotFoundException: Unable to load DLL ‘C:\Users\xagurod\AppData\Local\UiPath\app-21.4.3\git2-572e4d8.dll’ or one of its dependencies: No se puede encontrar el módulo especificado. (0x8007007E)
at System.Runtime.InteropServices.NativeLibrary.LoadFromPath(String libraryName, Boolean throwOnError)
at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath)
at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath)
at UiPath.Studio.Core.Plugins.PluginLoadContext.LoadUnmanagedFromPath(String unmanagedDllPath)
at UiPath.Studio.Core.Plugins.PluginLoadContextManager.LoadUnmanagedDll(String unmanagedDllName, IPluginLoadContext callingContext)
at UiPath.Studio.Core.Plugins.PluginLoadContext.LoadUnmanagedDll(String unmanagedDllName)
at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext)
at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
at LibGit2Sharp.Core.NativeMethods…cctor()
— End of inner exception stack trace —
at LibGit2Sharp.Core.NativeMethods.git_clone(git_repository*& repo, String origin_url, FilePath workdir_path, GitCloneOptions& opts)
at LibGit2Sharp.Core.Proxy.git_clone(String url, String workdir, GitCloneOptions& opts)
at LibGit2Sharp.Repository.Clone(String sourceUrl, String workdirPath, CloneOptions options)
at UiPath.Studio.Plugin.Git.Wrappers.RepositoryInit.Clone(String sourceUrl, String workdirPath, CloneOptions options)
at UiPath.Studio.Plugin.Git.Services.CloneService.<>c__DisplayClass3_0.b__0()
at UiPath.Studio.Plugin.Git.Desktop.Services.UiAuthenticationSession.Execute[T](ExecuteArgs1 args) at UiPath.Studio.Plugin.Git.Services.CloneService.CheckoutCore(String uri, String localFolder, IAuthenticationSession authenticationSession) at UiPath.Studio.Plugin.Git.Services.CloneService.<>c__DisplayClass2_0.<Checkout>b__0() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at UiPath.Studio.Plugin.Git.Services.CloneService.Checkout(String repository, String localFolder, IAuthenticationSession authenticationSession) at UiPath.Studio.Plugin.Git.Desktop.Services.CheckOutUiService.CheckOut_ExecuteInternal() at UiPath.Studio.SourceControl.Shared.Desktop.Services.BaseCheckOutUiService1.CheckOut_Execute()
at UiPath.Studio.SourceControl.Shared.Desktop.Services.BaseCheckOutUiService1.<get_CheckOutCommand>b__11_0() at UiPath.Studio.App.Desktop.MVVM.Commands.TaskCommand3.Execute(TExecuteParameter parameter, Boolean ignoreCanExecuteCheck)
at System.Threading.Tasks.Task.<>c.b__140_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2146233036

Thanks!

Can you please try with 21.6 build? We fixed some existing git issues.

Please let me know if it works for you.

i have the same issue. An update to Beta 21.6 4514 did not change anything. It doesn’t matter whether I start a GIT initialization or want to copy it into the GIT

Hi @rodri.ea90 @frankykey

Could you check if this is installed on your machine?

Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 x86 (required for source control on Studio v2019.10.5 and up).
This component is installed by default with the operating system and should be reinstalled if removed.

Thanks for the advice.

These components are installed. I also installed Visual Studio (Community) and it worked immediately. Apparently something has been installed with VS that was missing before.

1 Like