docfx: Lots of GitExceptions on build

DocFX Version Used: 2.39.2

Template used: unchanged

Steps to Reproduce:

  1. Create an ASP.NET Core project that references docfx.console to build the documentation of other projects in the solution
  2. Build the solution, or just the docfx project alone

Expected Behavior:

A successful build, maybe?

Actual Behavior:

This repeats for a very long time, I’ve cancelled the build.

2>[18-09-18 01:24:04.655]Info:[MetadataCommand.ExtractMetadata]Generating metadata for each project...
2>[18-09-18 01:24:08.729]Warning:[MetadataCommand.ExtractMetadata]Skipping GetFileDetail. Exception found: Microsoft.DocAsCode.Common.Git.GitException, Message:
2>[18-09-18 01:24:08.732]Verbose:[MetadataCommand.ExtractMetadata]Microsoft.DocAsCode.Common.Git.GitException
2>   bei Microsoft.DocAsCode.Common.Git.GitUtility.ProcessErrorMessage(String message)
2>   bei Microsoft.DocAsCode.Common.Git.GitUtility.RunGitCommand(String repoPath, String arguments, Action`1 processOutput)
2>   bei Microsoft.DocAsCode.Common.Git.GitUtility.RunGitCommandAndGetLastLine(String repoPath, String arguments)
2>   bei Microsoft.DocAsCode.Common.Git.GitUtility.GetRepoInfoCore(String directory)
2>   bei System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
2>   bei System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
2>   bei System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
2>   bei System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
2>   bei Microsoft.DocAsCode.Common.Git.GitUtility.GetFileDetailCore(String filePath)
2>   bei Microsoft.DocAsCode.Common.Git.GitUtility.GetFileDetail(String filePath)
2>   bei Microsoft.DocAsCode.Common.Git.GitUtility.TryGetFileDetail(String filePath)

It works on my colleague’s computer but not on mine after checking out the code from the Git repo.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 18 (8 by maintainers)

Most upvoted comments

Ehm, maybe it’s because I have chosen another name for the remote? Because “origin” says nothing about where that remote actually is. Does docfx require the hard-coded name “origin” for the remote? That would be just about as inflexible as Git LFS is.

The (undocumented) commandline parameter --disableGitFeatures works fine. However, the (also undocumented) metadata value “disableGitFeatures” does not fully disable all Git features and still produces warnings. In addition “disableGitFeatures” is not included in the JSON schema and thus produces a warning in the Visual Studion JSON editor.

Would be great if the metadata value “disableGitFeatures” would work exactly like the commandline parameter, and also be included in the JSON schema at http://json.schemastore.org/docfx. Finally an updated docfx user manual would also be very welcome.