Doraku / DefaultDocumentation

Create a simple markdown documentation from the Visual Studio xml one.
MIT No Attribution
157 stars 26 forks source link

Plugin types not resolving #145

Open juliansangillo opened 1 year ago

juliansangillo commented 1 year ago

Hello. Thank you for this library. This is definitely the best library I found for generating markdown docs.

I am trying to create a plugin that can be installed from NuGet and the plugin will have my own implementation of a FolderFileNameFactory like the one in your plugin example. Unfortunately I am running into some errors when building the target project. First I tried with version 0.8.2 and received an error that DefaultDocumentation.Api could not be found even though it is referenced in the NuGet plugin.

0>2023-05-07 12:20:24.2924|INFO|DefaultDocumentation|Starting DefaultDocumentation with this configuration:
{
  "LogLevel": "Trace",
  "AssemblyFilePath": "/home/zero/Repositories/Reflection/bin/Debug/netstandard2.0/JulianSangillo.Reflection.dll",
  "DocumentationFilePath": "/home/zero/Repositories/Reflection/obj/Debug/netstandard2.0/JulianSangillo.Reflection.xml",
  "ProjectDirectoryPath": "/home/zero/Repositories/Reflection/",
  "OutputDirectoryPath": "/home/zero/Repositories/Reflection/docs",
  "Plugins": [
    "/home/zero/.nuget/packages/defaultdocumentation.pluginexample/0.1.0/build/../lib/netstandard2.0/DefaultDocumentation.PluginExample.dll"
  ],
  "FileNameFactory": "Folder",
  "UrlFactories": [
    "DocItem",
    "DotnetApi"
  ],
  "Sections": [
    "Header",
    "Default"
  ]
}
0>2023-05-07 12:20:24.2979|INFO|DefaultDocumentation|Starting DefaultDocumentation with those settings:
  AssemblyFile: /home/zero/Repositories/Reflection/bin/Debug/netstandard2.0/JulianSangillo.Reflection.dll
  DocumentationFile: /home/zero/Repositories/Reflection/obj/Debug/netstandard2.0/JulianSangillo.Reflection.xml
  ProjectDirectory: /home/zero/Repositories/Reflection/
  OutputDirectory: /home/zero/Repositories/Reflection/docs
  AssemblyPageName: 
  GeneratedAccessModifiers: Public, Private, Protected, Internal, ProtectedInternal, PrivateProtected
  GeneratedPages: Namespaces, Types, Members
  IncludeUndocumentedItems: False
  LinksOutputFile: 
  LinksBaseUrl: 
  ExternLinksFiles:
0>/home/zero/.nuget/packages/defaultdocumentation/0.8.2/build/DefaultDocumentation.targets(45,3): Error MSB4018 : The "DefaultDocumentationTask" task failed unexpectedly.
System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types.
Could not load file or assembly 'DefaultDocumentation.Api, Version=0.8.2.0, Culture=neutral, PublicKeyToken=0ab8f459261ccb3c'. The system cannot find the file specified.

   at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
   at System.Reflection.Assembly.GetTypes()
   at DefaultDocumentation.Generator.<>c.<.ctor>b__5_53(Assembly a) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:line 120
   at System.Linq.Enumerable.SelectManySingleSelectorIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at DefaultDocumentation.Generator..ctor(Target loggerTarget, IRawSettings settings) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:line 116
   at DefaultDocumentation.Generator.Execute(Target loggerTarget, IRawSettings settings) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:line 195
   at DefaultDocumentation.DefaultDocumentationTask.Execute() in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation\DefaultDocumentationTask.cs:line 57
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
System.IO.FileNotFoundException: Could not load file or assembly 'DefaultDocumentation.Api, Version=0.8.2.0, Culture=neutral, PublicKeyToken=0ab8f459261ccb3c'. The system cannot find the file specified.

File name: 'DefaultDocumentation.Api, Version=0.8.2.0, Culture=neutral, PublicKeyToken=0ab8f459261ccb3c'
Build failed at 12:20:24 PM 

Then I tried to downgrade to 0.8.1 and I ran into a different error that it couldn't find the FileNameFactory with name 'Folder' even though it does exist.

0>2023-05-07 12:14:21.2416|INFO|DefaultDocumentation|Starting DefaultDocumentation with this configuration:
{
  "LogLevel": "Trace",
  "AssemblyFilePath": "/home/zero/Repositories/Reflection/bin/Debug/netstandard2.0/JulianSangillo.Reflection.dll",
  "DocumentationFilePath": "/home/zero/Repositories/Reflection/obj/Debug/netstandard2.0/JulianSangillo.Reflection.xml",
  "ProjectDirectoryPath": "/home/zero/Repositories/Reflection/",
  "OutputDirectoryPath": "/home/zero/Repositories/Reflection/docs",
  "Plugins": [
    "/home/zero/.nuget/packages/defaultdocumentation.pluginexample/0.1.0/build/../lib/netstandard2.0/DefaultDocumentation.PluginExample.dll"
  ],
  "FileNameFactory": "Folder",
  "UrlFactories": [
    "DocItem",
    "DotnetApi"
  ],
  "Sections": [
    "Header",
    "Default"
  ]
}
0>2023-05-07 12:14:21.2470|INFO|DefaultDocumentation|Starting DefaultDocumentation with those settings:
  AssemblyFile: /home/zero/Repositories/Reflection/bin/Debug/netstandard2.0/JulianSangillo.Reflection.dll
  DocumentationFile: /home/zero/Repositories/Reflection/obj/Debug/netstandard2.0/JulianSangillo.Reflection.xml
  ProjectDirectory: /home/zero/Repositories/Reflection/
  OutputDirectory: /home/zero/Repositories/Reflection/docs
  AssemblyPageName: 
  GeneratedAccessModifiers: Public, Private, Protected, Internal, ProtectedInternal, PrivateProtected
  GeneratedPages: Namespaces, Types, Members
  IncludeUndocumentedItems: False
  LinksOutputFile: 
  LinksBaseUrl: 
  ExternLinksFiles:
0>2023-05-07 12:14:21.4032|TRACE|DefaultDocumentation|looking for documentation of "T:JulianSangillo.Reflection.AssemblyDoc"
0>2023-05-07 12:14:21.4141|TRACE|DefaultDocumentation|looking for documentation of ""
0>2023-05-07 12:14:21.4141|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.AssemblyDocItem" with id "JulianSangillo.Reflection"
0>2023-05-07 12:14:21.4220|DEBUG|DefaultDocumentation|handling type "<Module>"
0>2023-05-07 12:14:21.4220|DEBUG|DefaultDocumentation|Skipping documentation for type "<Module>": empty namespace
0>2023-05-07 12:14:21.4247|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.AssemblyCollection"
0>2023-05-07 12:14:21.4247|TRACE|DefaultDocumentation|looking for documentation of "T:JulianSangillo.Reflection.NamespaceDoc"
0>2023-05-07 12:14:21.4247|TRACE|DefaultDocumentation|looking for documentation of ""
0>2023-05-07 12:14:21.4247|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.AssemblyCollection"
0>2023-05-07 12:14:21.4994|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.AssemblyCollection.enumerable"
0>2023-05-07 12:14:21.4994|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.AssemblyCollection.enumerable"
0>2023-05-07 12:14:21.4994|DEBUG|DefaultDocumentation|Skipping documentation for member "JulianSangillo.Reflection.AssemblyCollection.enumerable": no documentation
0>2023-05-07 12:14:21.4994|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.AssemblyCollection.<Types>k__BackingField"
0>2023-05-07 12:14:21.5170|DEBUG|DefaultDocumentation|Skipping documentation for member "JulianSangillo.Reflection.AssemblyCollection.<Types>k__BackingField": compiler generated
0>2023-05-07 12:14:21.5170|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.AssemblyCollection.Types"
0>2023-05-07 12:14:21.5170|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.AssemblyCollection.Types"
0>2023-05-07 12:14:21.5170|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.AssemblyCollection.Types"
0>2023-05-07 12:14:21.5212|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.IAssemblyCollection.Types"
0>2023-05-07 12:14:21.5212|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.PropertyDocItem" with id "P:JulianSangillo.Reflection.AssemblyCollection`1.Types"
0>2023-05-07 12:14:21.5212|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.AssemblyCollection..ctor"
0>2023-05-07 12:14:21.5212|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.AssemblyCollection..ctor"
0>2023-05-07 12:14:21.5261|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.ConstructorDocItem" with id "M:JulianSangillo.Reflection.AssemblyCollection`1.#ctor"
0>2023-05-07 12:14:21.5261|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.AssemblyCollection.GetEnumerator"
0>2023-05-07 12:14:21.5261|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.AssemblyCollection.GetEnumerator"
0>2023-05-07 12:14:21.5261|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.AssemblyCollection`1.GetEnumerator"
0>2023-05-07 12:14:21.5261|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.AssemblyCollection.System.Collections.IEnumerable.GetEnumerator"
0>2023-05-07 12:14:21.5297|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.AssemblyCollection.System.Collections.IEnumerable.GetEnumerator"
0>2023-05-07 12:14:21.5297|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.ExplicitInterfaceImplementationDocItem" with id "M:JulianSangillo.Reflection.AssemblyCollection`1.System#Collections#IEnumerable#GetEnumerator"
0>2023-05-07 12:14:21.5297|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.AssemblyCollection.GetAllAssemblies"
0>2023-05-07 12:14:21.5297|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.AssemblyCollection.GetAllAssemblies"
0>2023-05-07 12:14:21.5297|DEBUG|DefaultDocumentation|Skipping documentation for member "JulianSangillo.Reflection.AssemblyCollection.GetAllAssemblies": no documentation
0>2023-05-07 12:14:21.5297|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.NamespaceDocItem" with id "N:JulianSangillo.Reflection"
0>2023-05-07 12:14:21.5297|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Types.ClassDocItem" with id "T:JulianSangillo.Reflection.AssemblyCollection`1"
0>2023-05-07 12:14:21.5297|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.TypeParameterDocItem" with id "T:JulianSangillo.Reflection.AssemblyCollection`1.TEntryPoint"
0>2023-05-07 12:14:21.5297|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.Extensions"
0>2023-05-07 12:14:21.5297|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.Extensions"
0>2023-05-07 12:14:21.5297|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.Extensions.ToTypeCollection"
0>2023-05-07 12:14:21.5297|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.Extensions.ToTypeCollection"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.Extensions.ToTypeCollection(System.Collections.Generic.IEnumerable{System.Type})"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.Extensions.ToTypeCollection(System.Collections.Generic.IEnumerable{System.Type}).this"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Types.ClassDocItem" with id "T:JulianSangillo.Reflection.Extensions"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.IAssemblyCollection"
0>2023-05-07 12:14:21.5330|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.IAssemblyCollection"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.IAssemblyCollection.Types"
0>2023-05-07 12:14:21.5330|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.IAssemblyCollection.Types"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.PropertyDocItem" with id "P:JulianSangillo.Reflection.IAssemblyCollection.Types"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Types.InterfaceDocItem" with id "T:JulianSangillo.Reflection.IAssemblyCollection"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.ITypeCollection"
0>2023-05-07 12:14:21.5330|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.ITypeCollection.WithName"
0>2023-05-07 12:14:21.5330|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.WithName"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.WithName(System.String)"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.WithName(System.String).name"
0>2023-05-07 12:14:21.5330|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.ITypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5330|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.AssignableTo``1(System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.TypeParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.AssignableTo``1(System.Boolean,System.Boolean).T"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.AssignableTo``1(System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.AssignableTo``1(System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.ITypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.AssignableTo(System.Type,System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.AssignableTo(System.Type,System.Boolean,System.Boolean).type"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.AssignableTo(System.Type,System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.AssignableTo(System.Type,System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.ITypeCollection.ImplementsGeneric"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.ImplementsGeneric"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.ImplementsGeneric(System.Type,System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.ImplementsGeneric(System.Type,System.Boolean,System.Boolean).type"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.ImplementsGeneric(System.Type,System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.ImplementsGeneric(System.Type,System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.ITypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.TypeParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean).T"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean).inherit"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.ITypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean).type"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean).inherit"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.ITypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.InstanceOf``1"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.TypeParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.InstanceOf``1.T"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.ITypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.InstanceOf(System.Type)"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.ITypeCollection.InstanceOf(System.Type).type"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Types.InterfaceDocItem" with id "T:JulianSangillo.Reflection.ITypeCollection"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.TypeCollection"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.types"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.types"
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|Skipping documentation for member "JulianSangillo.Reflection.TypeCollection.types": no documentation
0>2023-05-07 12:14:21.5384|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection..ctor"
0>2023-05-07 12:14:21.5384|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection..ctor"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.ConstructorDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.#ctor(System.Collections.Generic.IEnumerable{System.Type})"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.#ctor(System.Collections.Generic.IEnumerable{System.Type}).types"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection..ctor"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection..ctor"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.ConstructorDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.#ctor(JulianSangillo.Reflection.IAssemblyCollection)"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.#ctor(JulianSangillo.Reflection.IAssemblyCollection).assemblies"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.GetEnumerator"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.GetEnumerator"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.GetEnumerator"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.WithName"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.WithName"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.TypeCollection.WithName"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.WithName"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.WithName(System.String)"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.WithName(System.String).name"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.TypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.AssignableTo``1(System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.TypeParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.AssignableTo``1(System.Boolean,System.Boolean).T"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.AssignableTo``1(System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.AssignableTo``1(System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.TypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.AssignableTo"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.AssignableTo(System.Type,System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.AssignableTo(System.Type,System.Boolean,System.Boolean).type"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.AssignableTo(System.Type,System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.AssignableTo(System.Type,System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.ImplementsGeneric"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.ImplementsGeneric"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.TypeCollection.ImplementsGeneric"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.ImplementsGeneric"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.ImplementsGeneric(System.Type,System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.ImplementsGeneric(System.Type,System.Boolean,System.Boolean).type"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.ImplementsGeneric(System.Type,System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.ImplementsGeneric(System.Type,System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.TypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.TypeParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean).T"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean).inherit"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute``1(System.Boolean,System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.TypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.HaveAttribute"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean)"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean).type"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean).inherit"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean).interfaces"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.HaveAttribute(System.Type,System.Boolean,System.Boolean,System.Boolean).abstracts"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.TypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.InstanceOf``1"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.TypeParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.InstanceOf``1.T"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for inherited documentation of "JulianSangillo.Reflection.TypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.ITypeCollection.InstanceOf"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.MethodDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.InstanceOf(System.Type)"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Parameters.ParameterDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.InstanceOf(System.Type).type"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling member "JulianSangillo.Reflection.TypeCollection.System.Collections.IEnumerable.GetEnumerator"
0>2023-05-07 12:14:21.5407|TRACE|DefaultDocumentation|looking for documentation of "JulianSangillo.Reflection.TypeCollection.System.Collections.IEnumerable.GetEnumerator"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Members.ExplicitInterfaceImplementationDocItem" with id "M:JulianSangillo.Reflection.TypeCollection.System#Collections#IEnumerable#GetEnumerator"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|adding DocItem "DefaultDocumentation.Models.Types.ClassDocItem" with id "T:JulianSangillo.Reflection.TypeCollection"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.AssemblyCollection.<GetAllAssemblies>d__7"
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|Skipping documentation for type "JulianSangillo.Reflection.AssemblyCollection.<GetAllAssemblies>d__7": compiler generated
0>2023-05-07 12:14:21.5407|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.TypeCollection.<>c"
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|Skipping documentation for type "JulianSangillo.Reflection.TypeCollection.<>c": compiler generated
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.TypeCollection.<>c__10"
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|Skipping documentation for type "JulianSangillo.Reflection.TypeCollection.<>c__10": compiler generated
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.TypeCollection.<>c__DisplayClass4_0"
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|Skipping documentation for type "JulianSangillo.Reflection.TypeCollection.<>c__DisplayClass4_0": compiler generated
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.TypeCollection.<>c__DisplayClass6_0"
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|Skipping documentation for type "JulianSangillo.Reflection.TypeCollection.<>c__DisplayClass6_0": compiler generated
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.TypeCollection.<>c__DisplayClass7_0"
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|Skipping documentation for type "JulianSangillo.Reflection.TypeCollection.<>c__DisplayClass7_0": compiler generated
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|handling type "JulianSangillo.Reflection.TypeCollection.<>c__DisplayClass9_0"
0>2023-05-07 12:14:21.5447|DEBUG|DefaultDocumentation|Skipping documentation for type "JulianSangillo.Reflection.TypeCollection.<>c__DisplayClass9_0": compiler generated
0>/home/zero/.nuget/packages/defaultdocumentation/0.8.1/build/DefaultDocumentation.targets(45,3): Error MSB4018 : The "DefaultDocumentationTask" task failed unexpectedly.
System.Exception: FileNameFactory 'Folder' not found
   at DefaultDocumentation.Internal.Context..ctor(JObject configuration, Type[] availableTypes) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Internal\Context.cs:line 20
   at DefaultDocumentation.Internal.GeneralContext..ctor(JObject config, Type[] availableTypes, Settings settings, IReadOnlyDictionary`2 items) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Internal\GeneralContext.cs:line 30
   at DefaultDocumentation.Generator..ctor(Target loggerTarget, IRawSettings settings) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:line 116
   at DefaultDocumentation.Generator.Execute(Target loggerTarget, IRawSettings settings) in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation.Common\Generator.cs:line 196
   at DefaultDocumentation.DefaultDocumentationTask.Execute() in D:\a\DefaultDocumentation\DefaultDocumentation\source\DefaultDocumentation\DefaultDocumentationTask.cs:line 57
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask)
Build failed at 12:14:21 PM 

I get the same 'Folder' not found error in version 0.8.0 as well. I don't think I can downgrade further than that since plugins were only introduced in 0.8.0.

I looked a bit into the code myself and it seems reflection is used to get the available types in the Generator class and is past into GeneralContext and its parent, Context. It seems Context is what throws that error when it can't find the FileNameFactory, so it is likely that reflection isn't finding my FolderFileNameFactory and isn't adding it to the available types like it should be. Since it is an MSBuild Task I can't debug it so I can't test this though.

juliansangillo commented 1 year ago

Update:

I have been poking around the code in the master branch and have been doing some debugging locally. I found the cause of the issue with loading the Api library. I put the plugin in its own nuget package, which means its dependencies have to be resolved by nuget, which doesn't happen when dynamically loading the plugin so the Api library can't be found. The only way to make this work is to copy the Api library to the output directory when packing the plugin, which doesn't happen by default. To fix this, I made the following changes to the plugin project:

<Project Sdk="Microsoft.NET.Sdk">
    <PropertyGroup>
        <TargetFramework>netstandard2.0</TargetFramework>
        <DevelopmentDependency>true</DevelopmentDependency>
        <SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
    </PropertyGroup>

    <ItemGroup>
        <PackageReference Include="DefaultDocumentation.Api" Version="0.8.2" PrivateAssets="all" GeneratePathProperty="true" />
    </ItemGroup>

    <ItemGroup>
        <None Include="DefaultDocumentation.PluginExample.targets" Pack="true" PackagePath="build\" />
        <None Include="$(PkgDefaultDocumentation_Api)\lib\netstandard2.0\DefaultDocumentation.Api.dll" Pack="true" PackagePath="lib\netstandard2.0\" />
    </ItemGroup>
</Project>

I will add this to a PR later to help others who run into this issue when trying to adopt the PluginExample.

Once I fixed the issue with the Api library, I ran right into the other issue where it can't find the FolderFileNameFactory. I haven't figured that out yet. It looks like issue #109 addresses something similar, but this is still happening to me.

juliansangillo commented 1 year ago

Update:

I found a better solution that fixes both issues.

The problem is that even if we solve the first issue by copying the DefaultDocumentation.Api assembly into the same directory, two assemblies will end up getting loaded, the Api nuget library referenced by the plugin and the Api project in the DefaultDocumentation solution. However, even though both assemblies have an interface called IFileNameFactory, it considers the IFileNameFactory in the Api project to be a different type than the one in the nuget library. Same with all the other types in DefaultDocumentation.Api. So, when it tries to locate all implementations of IFileNameFactory, it uses the IFileNameFactory in the Api project rather than the nuget library, so it doesn't find the plugin implementation.

The best solution I could find is to assign our own method to the AppDomain.AssemblyResolve event. This event will get called when Assembly.LoadFrom fails to resolve an assembly or its dependencies, so we can try to locate the assembly manually instead of throwing an error. We can then search the assemblies that have already been loaded and return one that matches the full name, or return null if one has not been found. The idea is that the DefaultDocumentation.Api assembly and its dependencies have already been loaded by the DefaultDocumentation solution, and when they can't be found in the same directory as the plugin, instead use the ones that have already been loaded. That resolves both issues as it is now able to locate the assembly and it can find all the types because the DefaultDocumentation solution and the plugin are both referencing the same assembly.

private Generator(Target loggerTarget, IRawSettings settings)
{
    ...

    AppDomain.CurrentDomain.AssemblyResolve += OnResolve;
    _context = new GeneralContext(
        _configuration,
        new[] { typeof(Markdown.Writers.MarkdownWriter).Assembly }
            .Concat((GetSetting<string[]>(nameof(settings.Plugins)) ?? Enumerable.Empty<string>()).Select(Assembly.LoadFrom))
            .SelectMany(a => a.GetTypes())
            .ToArray(),
        resolvedSettings,
        DocItemReader.GetItems(resolvedSettings));
}

private Assembly OnResolve(Object sender, ResolveEventArgs e)
{
    return Array.Find(AppDomain.CurrentDomain.GetAssemblies(), asm => asm.FullName == e.Name);
}

The only problem with this solution is that it only works if the references on both sides, the DefaultDocumentation solution and the plugin, are the same. That means if the plugin has a package reference to DefaultDocumentation.Api version 0.8.2, then the DefaultDocumentation solution must also have a package reference to DefaultDocumentation.Api version 0.8.2. They both have to reference the nuget library with the same version. The only downside to this is that the Api version has to be manually updated if we change the Api package.

I will add these fixes to a pull request later.

Below is the documentation for the AssemblyResolve event for more information on this:

https://learn.microsoft.com/en-us/dotnet/standard/assembly/resolve-loads

juliansangillo commented 1 year ago

Update:

I was seeing if there was a less hacky solution than using a package reference for the Api library. After manually testing the packages locally, I found that the Api assembly being referenced could be different between the base project and the plugin as long as they have the same qualified name (the name, version, culture, and public key token all have to be the same). I thought the two assemblies had different public key tokens (the one in the base project was null and the one in the nuget library was not null) but that was not actually true.

The public key token is generated because the Api library and the other DefaultDocumentation libraries are signed, something I did not know about until now. Turns out it was the one in the nuget library where the public key token was appearing as null in the debugger and the reason for this was my plugin library was unsigned and an unsigned assembly can't reference a signed one.

I added the ProjectReference to the Api project back in as that was not the real reason for the assembly not being loaded. The solution, in addition to the code I already pushed in the PR, is to also sign the assembly for my plugin using my own snk file. Once it is signed, the correct public key token for the Api library will be exposed and it the plugin should work.

I also feel like there is a gap in this project's documentation. I didn't know about signing NuGet libraries until I looked into this issue and it was not mentioned anywhere that the plugins had to be signed. I will update my PR with this info to the documentation and plugin example.

LarsDammannCoherent commented 9 months ago

Thank you @juliansangillo for studying this issue. We ran across this in our project and I would love for it to be fixed. The URL factory and file name factory don't work for our process. We want a folder structure with pretty filenames in a Azure DevOps wiki and reference things between multiple assemblies, which absolutely requires code changes or a plugin. But since plugins don't work because of this issue, we are stuck. I hope @Doraku will get to it eventually (Thanks for the great package!)

Doraku commented 7 months ago

Sorry for the long period of inactivity and thank you @juliansangillo for all this write up. I just started to get back into my projects and ran into the FileNameFactory 'Folder' not found error too in an other repo using DefaultDocumentation which had me scratching my head as it was working fine the last time I looked at it as far as I can recall... I'll try to retrace your steps to make sense of this issue, as for the signed part normally you should be able to use signed assemblies from unsigned assemblies, and load at runtime unsigned assemblies from signed assemblies so it's weird it's not behaving correctly :/ I'll look into all this mess.

adlerzei commented 2 weeks ago

We ran into the same issue. Build works using MSBuild 17.10.4+10fbfbf2e from Visual Studio 2022 but does not work using dotnet build version 8.0.202. Even more, it does not work with MSBuild 17.10.4+10fbfbf2e from Rider 2024.1.4.

I hope this will be fixed in the future.

a10r commented 1 day ago

As a workaround, you can apply the fix @juliansangillo found in a build task that runs right before DefaultDocumentation. This way you don't have to fork DefaultDocumentation.

<Target Name="FixDefaultDocumentationPluginLoading" BeforeTargets="DefaultDocumentation"
        Condition="$(SkipDefaultDocumentationHack)!='true'">
    <FixDefaultDocumentationPluginLoading/>
</Target>

<UsingTask TaskName="FixDefaultDocumentationPluginLoading" TaskFactory="RoslynCodeTaskFactory"
           AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
    <Task>
        <Code Type="Fragment" Language="cs">
            <![CDATA[
                AppDomain.CurrentDomain.AssemblyResolve += (_, e) =>
                    Array.Find(AppDomain.CurrentDomain.GetAssemblies(), asm => asm.FullName == e.Name);
        ]]>
        </Code>
    </Task>
</UsingTask>