api-doc-tools icon indicating copy to clipboard operation
api-doc-tools copied to clipboard

mdoc fails to run inside GitHub Actions

Open dend opened this issue 4 years ago • 1 comments

Getting the following error:

Run D:\a\decksurf-sdk\decksurf-sdk\_mdoc\mdoc.exe update --debug --out _xml -fx frameworks.xml --use-docid
  D:\a\decksurf-sdk\decksurf-sdk\_mdoc\mdoc.exe update --debug --out _xml -fx frameworks.xml --use-docid
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
mdoc 5.8.3
Opening frameworks file 'frameworks.xml'
Frameworks Configuration contains 1 assemblies
Creating frameworks cache: Caching net5.0\DeckSurf.SDK.dll
mdoc: Mono.Documentation.MDocAssemblyException: Error caching DeckSurf.SDK, Version=0.0.2.0, Culture=neutral, PublicKeyToken=null from net5.0\DeckSurf.SDK.dll ---> System.ArgumentException: String cannot be of zero length.
Parameter name: oldValue
   at System.String.ReplaceInternal(String oldValue, String newValue)
   at System.String.Replace(String oldValue, String newValue)
   at Mono.Documentation.Updater.Frameworks.FrameworkIndex.GetFrameworkNameFromPath(String rootpath, String assemblyPath)
   at Mono.Documentation.Updater.Frameworks.FrameworkIndex.StartProcessingAssembly(AssemblySet set, AssemblyDefinition assembly, IEnumerable`1 importers, String Id, String Version)
   at Mono.Documentation.MDocUpdater.Run(IEnumerable`1 args)
   --- End of inner exception stack trace ---
   at Mono.Documentation.MDocUpdater.Run(IEnumerable`1 args)
   at Mono.Documentation.MDoc.Main(String[] args)
See `mdoc help' for more information or use --debug to diagnose.
Error: Process completed with exit code 1.

See sample job (failed step) for the content. The step before that shows what the XML content is for the frameworks.xml.

dend avatar Jul 23 '21 23:07 dend

And if I change the path to .\frameworks.xml, I get mdoc to hang completely in the action:

Run D:\a\decksurf-sdk\decksurf-sdk\_mdoc\mdoc.exe update --debug --out _xml -fx .\frameworks.xml --use-docid
  D:\a\decksurf-sdk\decksurf-sdk\_mdoc\mdoc.exe update --debug --out _xml -fx .\frameworks.xml --use-docid
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
mdoc 5.8.3
Opening frameworks file '.\frameworks.xml'
Frameworks Configuration contains 1 assemblies
Creating frameworks cache: Caching .\net5.0\DeckSurf.SDK.dll

dend avatar Jul 23 '21 23:07 dend