Docfx fails to build documentation for seed project
See original GitHub issueI 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__16
2.MoveNext() at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable
1 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, IReadOnlyList
1 fallbackFolders) at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.DfmService…ctor(String baseDir, String templateDir, ImmutableDictionary2 tokens, IMarkdownTokenTreeValidator tokenTreeValidator, IReadOnlyList
1 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(IEnumerable
1 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__16
2.MoveNext() at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor(IEnumerable
1 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, IReadOnlyList
1 fallbackFolders) at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.DfmService…ctor(String baseDir, String templateDir, ImmutableDictionary2 tokens, IMarkdownTokenTreeValidator tokenTreeValidator, IReadOnlyList
1 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(IEnumerable
1 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:
- Created 7 years ago
- Reactions:1
- Comments:13 (9 by maintainers)
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 ?
@vicancy yes, it’s working now, thank you.