Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mortenn opened this issue Oct 20, 2022 · 1 comment

Comments

@mortenn
Copy link

mortenn commented Oct 20, 2022

System.Reflection.ReflectionTypeLoadException: 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.
   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.RuntimeAssembly.get_DefinedTypes()
   at XmlDocMarkdown.Core.MarkdownGenerator.DoGenerateOutput(Assembly assembly, XmlDocAssembly xmlDocAssembly)+MoveNext() in /_/src/XmlDocMarkdown.Core/MarkdownGenerator.cs:line 53
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at XmlDocMarkdown.Core.XmlDocMarkdownGenerator.Generate(XmlDocInput input, String outputPath, XmlDocMarkdownSettings settings) in /_/src/XmlDocMarkdown.Core/XmlDocMarkdownGenerator.cs:line 88
   at XmlDocMarkdown.Core.XmlDocMarkdownApp.Run(IReadOnlyList`1 args) in /_/src/XmlDocMarkdown.Core/XmlDocMarkdownApp.cs:line 70
System.IO.FileNotFoundException: 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.
File name: 'Microsoft.Extensions.Hosting.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'
@ejball
Copy link
Owner

ejball commented Nov 12, 2022

Sorry about that. Unfortunately that's proved a difficult problem to solve for the standalone tool. I highly recommend the strategy mentioned in the docs, i.e. creating a documentation-generating tool specifically for your project that references it directly, which is fairly straightforward and solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants