charlesdevandiere/xmldoc2md

dotnet tool fails to run with a missing Microsoft.Extensions.Hosting.Abstractions 6.0.0.0 error

Opened this issue · 8 comments

Just added the tool to a project and tried running it, but it fails with this error:

Generation started: Assembly: Project.Edge.Controller
Unable to generate documentation:
Unable to load one or more of the requested types.
Could not load file or assembly 'Microsoft.Extensions.Hosting.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.

Any updates on this?

Same here

Generation started: Assembly: ObjectStorage
Unable to generate documentation:
Unable to load one or more of the requested types.
Could not load file or assembly 'Minio, Version=4.0.7.0, Culture=neutral, PublicKeyToken=a7f2f2a2cd6a6a20'.

Unable to generate documentation:
Could not load file or assembly 'Debug, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.

Hi, can you provide the repro steps please?

I get the same issues when I try to run this tool:

  • Could not load file or assembly 'nunit.framework, Version=3.13.3.0, Culture=neutral, PublicKeyToken=2638cd05610744eb'. The system cannot find the file specified.
  • Could not load file or assembly 'Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10'. The system cannot find the file specified.
  • Could not load file or assembly 'Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. The system cannot find the file specified.

I run the command given in the Readme: xmldoc2md [PATH to DLL] [Output PATH]
I dont know if its issues with fetching stuff with the nuget packages? The .dlls of the nuget packages are in the same bin folder as the dll of the project i am trying to generate from

Hi @johanpearson,
I noticed that the dependencies are not copied to the output directory during the build. However, I managed to load a dependency using dotnet publish for project build:

dotnet publish -c Release
src/XMLDoc2Markdown/bin/Release/net7.0/publish/XMLDoc2Markdown sample/MyClassLib/bin/Release/netstandard2.0/publish/MyClassLib.dll docs/sample --examples-path sample/docs/examples --github-pages --back-button

Tell me if it works for you

I'm experiencing a similar issue, even after publishing. The tool can't find System.Runtime

Unable to generate documentation:
Unable to load one or more of the requested types.
Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

Publishing did copy a few more dependencies than the standard build, but System.Runtime was not.

I fixed a lot of these issues in my fork, if that fixes it for you I can PR the relevant changes if the maintainer is interested.