Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

The sample does not work on Mono/OS X #2

Open
lextm opened this issue Jan 2, 2016 · 3 comments
Open

The sample does not work on Mono/OS X #2

lextm opened this issue Jan 2, 2016 · 3 comments

Comments

@lextm
Copy link

lextm commented Jan 2, 2016

If the goal of docfx is to be cross platform, then its sample should also be made the same way.

This sample can now only be compiled under Mono/OS X by switching DNVM to 1.0.0-rc1-update1,

dnvm list

Active Version              Runtime Architecture OperatingSystem Alias
------ -------              ------- ------------ --------------- -----
       1.0.0-rc1-final      coreclr x64          darwin          default
       1.0.0-rc1-final      mono                 linux/osx       
  *    1.0.0-rc1-update1    mono                 linux/osx       

But it gives the following error message,

docfx
Info: Loading plug-in... in phase Build Document
Info: Plug-in loaded (ConceptualDocumentProcessor, ManagedReferenceDocumentProcessor, ResourceDocumentProcessor, TocDocumentProcessor) in phase Build Document
Warning: Error opening solution /Users/lextm/docfx-seed/src/SampleClass1/SampleClass1.sln: The classes in the module cannot be loaded.. Ignored.
Warning: No metadata is generated for .
Info: No files are found with glob pattern **/*.yml, excluding <none>, under working directory 
Info: Start building document ... in phase Build Document
Info: Plug-in ConceptualDocumentProcessor: Loading document... in phase Build Document
Info: Plug-in ConceptualDocumentProcessor: Document loaded (count = 5). in phase Build Document
Info: Plug-in ConceptualDocumentProcessor: Preprocessing... in phase Build Document
Info: Plug-in ConceptualDocumentProcessor: Building... in phase Build Document
Info: Plug-in ConceptualDocumentProcessor: Postprocessing... in phase Build Document
Info: Plug-in ConceptualDocumentProcessor: Saving... in phase Build Document
Info: Plug-in TocDocumentProcessor: Loading document... in phase Build Document
Info: Plug-in TocDocumentProcessor: Document loaded (count = 2). in phase Build Document
Info: Plug-in TocDocumentProcessor: Preprocessing... in phase Build Document
Info: Plug-in TocDocumentProcessor: Building... in phase Build Document
Info: TOC file articles/toc.md inside articles/ is used in phase Build Document in file toc.yml
Info: Homepage articles/docfx_getting_started.md is used. in phase Build Document in file toc.yml
Error: Unable to find either toc.yml or toc.md inside api/. Make sure the file is included in config file docfx.json! in phase Build Document in file toc.yml
Warning: Warning in build phase : following document error:
Unable to find either toc.yml or toc.md inside api/. Make sure the file is included in config file docfx.json!
Warning: 

Build succeeded with warning.
Warning: Error opening solution /Users/lextm/docfx-seed/src/SampleClass1/SampleClass1.sln: The classes in the module cannot be loaded.. Ignored.
Warning: No metadata is generated for .
Warning: Warning in build phase : following document error:
Unable to find either toc.yml or toc.md inside api/. Make sure the file is included in config file docfx.json!
Error: Unable to find either toc.yml or toc.md inside api/. Make sure the file is included in config file docfx.json! in phase Build Document in file toc.yml
Warning: 

There are totally 3 Warning(s), 1 Error(s) in phase Build Completed.

Note that the Documentation folder in https://github.com/dotnet/docfx also gives this error message. So currently it seems no sample can work on OS X.

@vicancy
Copy link
Contributor

vicancy commented Feb 26, 2016

Thanks for reporting the issue. Will add a DNX one...

@roji
Copy link

roji commented Dec 6, 2016

Seems to have just run into this with .NET Core 1.1.0 on Ubuntu yakkety, trying to generate API documentation from a csproj:

Warning: Error opening project /home/roji/projects/doc/Npgsql/src/Npgsql/Npgsql.csproj: The classes in the module cannot be loaded.. Ignored.
Warning: Cache for /home/roji/projects/doc/Npgsql/src/Npgsql/Npgsql.csproj in /home/roji/projects/doc/Npgsql/src/Npgsql/obj/xdoc/cache/final/-2009267585 is corrupted
Warning: No metadata is generated for .
Error: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (System.Reflection.Assembly,bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Reflection.Assembly+<>c__Iterator0.MoveNext () [0x00021] in <8f2c484307284b51944a1a13a14c0266>:0 
  at System.Linq.Enumerable+WhereSelectEnumerableIterator`2[TSource,TResult].MoveNext () [0x00078] in <63992662b765477a898ef49cdcc99ee2>:0 
  at System.Linq.Enumerable+<SelectManyIterator>c__Iterator2`2[TSource,TResult].MoveNext () [0x000bc] in <63992662b765477a898ef49cdcc99ee2>:0 
  at System.Composition.TypedParts.TypedPartExportDescriptorProvider..ctor (System.Collections.Generic.IEnumerable`1[T] types, System.Composition.Convention.AttributedModelProvider attributeContext) [0x00049] in <c091afde214c4b8e8efbbeb9d44062d4>:0 
  at System.Composition.Hosting.ContainerConfiguration.CreateContainer () [0x00042] in <c091afde214c4b8e8efbbeb9d44062d4>:0 
  at Microsoft.DocAsCode.Dfm.DfmEngineBuilder.GetContainer () [0x0005c] in <432999781422437b9586e927afbcea01>:0 
  at Microsoft.DocAsCode.Dfm.DfmEngineBuilder..ctor (Microsoft.DocAsCode.MarkdownLite.Options options, System.String baseDir, System.String templateDir, System.Collections.Generic.IReadOnlyList`1[T] fallbackFolders) [0x001fa] in <432999781422437b9586e927afbcea01>:0 
  at Microsoft.DocAsCode.Dfm.DocfxFlavoredMarked.CreateBuilder (System.String baseDir, System.String templateDir, Microsoft.DocAsCode.MarkdownLite.Options options, System.Collections.Generic.IReadOnlyList`1[T] fallbackFolders) [0x0000a] in <432999781422437b9586e927afbcea01>:0 
  at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider+DfmService..ctor (System.String baseDir, System.String templateDir, System.Collections.Immutable.ImmutableDictionary`2[TKey,TValue] tokens, Microsoft.DocAsCode.MarkdownLite.IMarkdownTokenTreeValidator tokenTreeValidator, System.Collections.Generic.IReadOnlyList`1[T] fallbackFolders) [0x00013] in <df39d17f74914acca8adf19af1426be3>:0 
  at Microsoft.DocAsCode.Build.Engine.DfmServiceProvider.CreateMarkdownService (Microsoft.DocAsCode.Plugins.MarkdownServiceParameters parameters) [0x00051] in <df39d17f74914acca8adf19af1426be3>:0 
  at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.CreateMarkdownService (Microsoft.DocAsCode.Build.Engine.DocumentBuildParameters parameters, System.Collections.Immutable.ImmutableDictionary`2[TKey,TValue] tokens) [0x0009e] in <df39d17f74914acca8adf19af1426be3>:0 
  at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.BuildCore (Microsoft.DocAsCode.Build.Engine.DocumentBuildParameters parameters) [0x001a1] in <df39d17f74914acca8adf19af1426be3>:0 
  at Microsoft.DocAsCode.Build.Engine.SingleDocumentBuilder.Build (Microsoft.DocAsCode.Build.Engine.DocumentBuildParameters parameters) [0x00065] in <df39d17f74914acca8adf19af1426be3>:0 
  at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.BuildCore (Microsoft.DocAsCode.Build.Engine.DocumentBuildParameters parameter) [0x0005f] in <df39d17f74914acca8adf19af1426be3>:0 
  at Microsoft.DocAsCode.Build.Engine.DocumentBuilder.Build (System.Collections.Generic.IEnumerable`1[T] parameters, System.String outputDirectory) [0x0008b] in <df39d17f74914acca8adf19af1426be3>:0 
  at Microsoft.DocAsCode.SubCommands.DocumentBuilderWrapper.BuildDocument (Microsoft.DocAsCode.BuildJsonConfig config, Microsoft.DocAsCode.Build.Engine.TemplateManager templateManager, System.String baseDirectory, System.String outputDirectory, System.String pluginDirectory, System.String templateDirectory) [0x000ff] in <48838e8ef2d14e4c851eaef79963d089>:0 
  at Microsoft.DocAsCode.SubCommands.BuildCommand.BuildDocument (System.String baseDirectory, System.String outputDirectory) [0x000a0] in <48838e8ef2d14e4c851eaef79963d089>:0 
  at Microsoft.DocAsCode.SubCommands.BuildCommand.Exec (Microsoft.DocAsCode.Plugins.SubCommandRunningContext context) [0x00051] in <48838e8ef2d14e4c851eaef79963d089>:0 
  at Microsoft.DocAsCode.SubCommands.CompositeCommand.Exec (Microsoft.DocAsCode.Plugins.SubCommandRunningContext context) [0x00014] in <48838e8ef2d14e4c851eaef79963d089>:0 
  at Microsoft.DocAsCode.Program.ExecSubCommand (System.String[] args) [0x000e0] in <48838e8ef2d14e4c851eaef79963d089>:0 
        3 Warning(s)
        1 Error(s)

@vicancy
Copy link
Contributor

vicancy commented Dec 7, 2016

Hi @roji, which version of docfx are you using? Did it work before?
csproj has a dependency on Microsoft Build Tools 2015, as docfx uses Roslyn while Roslyn depends on Build Tools. project.json can work around such issue.

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

No branches or pull requests

3 participants