question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docfx fails to build documentation for seed project

See original GitHub issue

I installed a windows 10 on a new virtual machine (no development environment), downloaded the seed project and downloaded the latest release of docfx. When I run docfx with the command: docfx.exe docfx-seed-master\docfx.json --serve

I get this exception:

Warning: Error opening solution C:/Users/devon/Downloads/docfx-seed-master/docfx-seed-master/src/SampleClass1/SampleClass1.sln: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information… Ignored. Warning: No metadata is generated for . Info: 5 plug-in(s) loaded. Info: Post processor ExtractSearchIndex loaded. Info: No files are found with glob pattern **/*.yml, excluding <none>, under directory “C:\Users\devon\Downloads\docfx-seed-master\docfx-seed-master\obj\api” Info: [Build Document]Max parallelism is 1. Info: [Build Document.CreateMarkdownService]Markdown engine is dfm Info: Completed building documents in 846.1755 milliseconds. Info: Completed executing in 1441.7506 milliseconds. Error: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.RuntimeAssembly.get_DefinedTypes() at System.Composition.Hosting.ContainerConfiguration.<WithAssemblies>b__0(Assembly a) at System.Linq.Enumerable.<SelectManyIterator>d__162.MoveNext() at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable1 types, AttributedModelProvider attributeContext) at System.Composition.Hosting.ContainerConfiguration.CreateContainer() at Microsoft.DocAsCode.Dfm.DfmEngineBuilder…ctor(Options options, String baseDir, String templateDir, IReadOnlyList1 fallbackFolders) at Microsoft.DocAsCode.Dfm.DocfxFlavoredMarked.CreateBuilder(String baseDir, String templateDir, Options options, IReadOnlyList1 fallbackFolders) at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.DfmService…ctor(String baseDir, String templateDir, ImmutableDictionary2 tokens, IMarkdownTokenTreeValidator tokenTreeValidator, IReadOnlyList1 fallbackFolders) at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.CreateMarkdownService(MarkdownServiceParameters parameters) at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.CreateMarkdownService(DocumentBuildParameters parameters, ImmutableDictionary2 tokens) at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.BuildCore(DocumentBuildParameters parameters) at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.BuildCore(DocumentBuildParameters parameter) at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.Build(IEnumerable1 parameters, String outputDirectory) at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory) at Microsoft.DocAsCode.SubCommands.BuildCommand.BuildDocument(String baseDirectory, String outputDirectory) at Microsoft.DocAsCode.SubCommands.BuildCommand.Exec(SubCommandRunningContext context) at Microsoft.DocAsCode.SubCommands.CompositeCommand.Exec(SubCommandRunningContext context) at Microsoft.DocAsCode.Program.ExecSubCommand(String[] args)

Build failed. Warning: Error opening solution C:/Users/devon/Downloads/docfx-seed-master/docfx-seed-master/src/SampleClass1/SampleClass1.sln: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information… Ignored. Warning: No metadata is generated for . Error: System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.RuntimeAssembly.get_DefinedTypes() at System.Composition.Hosting.ContainerConfiguration.<WithAssemblies>b__0(Assembly a) at System.Linq.Enumerable.<SelectManyIterator>d__162.MoveNext() at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable1 types, AttributedModelProvider attributeContext) at System.Composition.Hosting.ContainerConfiguration.CreateContainer() at Microsoft.DocAsCode.Dfm.DfmEngineBuilder…ctor(Options options, String baseDir, String templateDir, IReadOnlyList1 fallbackFolders) at Microsoft.DocAsCode.Dfm.DocfxFlavoredMarked.CreateBuilder(String baseDir, String templateDir, Options options, IReadOnlyList1 fallbackFolders) at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.DfmService…ctor(String baseDir, String templateDir, ImmutableDictionary2 tokens, IMarkdownTokenTreeValidator tokenTreeValidator, IReadOnlyList1 fallbackFolders) at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.CreateMarkdownService(MarkdownServiceParameters parameters) at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.CreateMarkdownService(DocumentBuildParameters parameters, ImmutableDictionary2 tokens) at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.BuildCore(DocumentBuildParameters parameters) at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.BuildCore(DocumentBuildParameters parameter) at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.Build(IEnumerable1 parameters, String outputDirectory) at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument(BuildJsonConfig config, TemplateManager templateManager, String baseDirectory, String outputDirectory, String pluginDirectory, String templateDirectory) at Microsoft.DocAsCode.SubCommands.BuildCommand.BuildDocument(String baseDirectory, String outputDirectory) at Microsoft.DocAsCode.SubCommands.BuildCommand.Exec(SubCommandRunningContext context) at Microsoft.DocAsCode.SubCommands.CompositeCommand.Exec(SubCommandRunningContext context) at Microsoft.DocAsCode.Program.ExecSubCommand(String[] args) 2 Warning(s) 1 Error(s)

I suspect I am missing a hidden dependency for docfx. Is there anything else I need to install or do to get it working? Can the error message be improved to be more meaningful? Can the documentation be improved to explain what is required to run docfx successfully?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:13 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
DeluxZcommented, Apr 12, 2017

Because of the dependency with Microsoft Build Tools 2015 generating metadata on the (preview) Hosted VS2017 agent in Visual Studio Online fails. The build logs show this line for every project

Warning:Error opening project C:/a/1/s/src/projectdir/project.csproj: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Ignored.

We are using some C# 7 features which need the Hosted VS2017. Is it easily to remove the dependency with Microsoft Build Tools 2015 ? Or maybe support Microsoft Build Tools 2017 ?

0reactions
tzachshabtaycommented, May 10, 2017

@vicancy yes, it’s working now, thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using docfx.console fails to generate documentation
The project throws the warning: Unable to find either toc.yml or toc.md inside obj/api/. Make sure the file is included in config file...
Read more >
Quick Start | docfx
Build your technical documentation site with docfx. Converts .NET assembly, XML code comment, REST API Swagger files and markdown into rendered HTML pages, ......
Read more >
Getting Started with DocFX
1. What is DocFX. DocFX is an API documentation generator for . · 2. Use DocFX as a command-line tool. Step1. · 3....
Read more >
Version Notes (Current Version: v2.37) | DocFX website
Fix #1886: Fails when project doesn't contain git remote information. Fix toc restruction to support ... DocFX is NOT dependent on Build Tool...
Read more >
Introduction to DocFX Documentation System - YouTube
DocFX allows you to create topic and API based documentation for your projects. We will learn how to install DocFX, set it up,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found