VisualStudio icon indicating copy to clipboard operation
VisualStudio copied to clipboard

"No repository" on any Git repository

Open vuplea opened this issue 3 years ago • 0 comments

  • GitHub Extension for Visual Studio version: 2.11.106.19330
  • Visual Studio version: 16.10.3

Open any solution in a git repo, and will see this: image

Some context:

  • Git integration in VS is enabled and works
  • When adding a new project to source control while pushing it to Github, then the extension appears to work until VS restart. After VS restart, "No repository"
  • This is the error in the log file
2021-07-07 16:51:34.603 [47352] EROR [26] VSGitExt                  Error refreshing repositories
System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'git2-106a5f2': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
   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_buf_dispose(GitBuf buf)
   at LibGit2Sharp.Core.Handles.GitBuf.Dispose()
   at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever)
   at LibGit2Sharp.Core.Proxy.git_repository_discover(FilePath start_path)
   at LibGit2Sharp.Repository.Discover(String startingPath)
   at GitHub.Services.RepositoryFacade.Discover(String startingPath) in D:\a\VisualStudio\VisualStudio\src\GitHub.Exports\Services\RepositoryFacade.cs:line 19
   at GitHub.Services.GitService.GetRepository(String path) in D:\a\VisualStudio\VisualStudio\src\GitHub.Exports\Services\GitService.cs:line 132
   at GitHub.Services.GitService.CreateLocalRepositoryModel(String localPath) in D:\a\VisualStudio\VisualStudio\src\GitHub.Exports\Services\GitService.cs:line 38
   at GitHub.VisualStudio.Base.VSGitExt.<RefreshActiveRepositories>b__9_1(IGitRepositoryInfo x)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at GitHub.VisualStudio.Base.VSGitExt.RefreshActiveRepositories()

vuplea avatar Jul 07 '21 13:07 vuplea