Has anyone built a Docker image for DocFX 2.x that supports metadata creation for .NET Core applications? I've created my own image using knsit/docfx:latest as a base and then adding the .NET Core SDK over top of it. The problem I'm running into is that DocFX is using mono as the inner compiler:
[21-03-19 01:53:58.802]Info:[ExtractMetadata]Using mono /usr/lib/mono/msbuild/15.0/bin/MSBuild.dll as inner compiler.
This gives me the following error:
[21-03-19 01:53:58.942]Error:System.IO.DirectoryNotFoundException: Could not find a part of the path '/proc/self/task/8/fd/4'
Build succeeded with warning.
[21-05-25 07:17:45.785]Warning:[MetadataCommand.ExtractMetadata]No metadata is generated for Minecraftchest1-utils.
1 Warning(s)
0 Error(s)
favicon
across many browsers. These 10 files have to be installed into the root of the documentation site. To keep the source repository cleanly organized, I'd like to store these 10 files in <reporoot>/assets/siteroot. Can DocFx copy the contents of <reporoot>/assets/siteroot into <reporoot>/_site during document generation? and if so, could someone share the .docfx snippet(s) necessary to accomplish it? Thanks!
Hi all, I am busy documenting a multi project solution. I have managed to generate the required .yml
files in a separate folder for each project, however, some of the projects make reference to the same classes in an other shared project resulting in some nasty warnings:
Warning:[BuildCommand.BuildCore.Build Document.LinkPhaseHandlerWithIncremental.ManagedReferenceDocumentProcessor.Save](ProjectA_sdk/ProjectB.Provider.Models.yml)Uid(ProjectB.Provider.Models) has already been defined in ProjectB-plugins/ProjectB.Provider.Models.yml.
Now I have tried several different variations of the exclude semantics inside of the src
section within the docfx.json
file but these files will just not be excluded. Sample of the excludes I have tried:
"exclude": [
//"ProjectB.Provider/**.csproj",
//"ProjectB.Provider/**",
//"ProjectB.Provider/Models/**",
"**/bin/**",
"**/obj/**",
"_site/**"
]
Is there anything I am missing W.R.T this exclude section? If not the next avenue I will explore is the Filtering of Unwanted APIs.
@BrettGFleischer It shouldn't be a problem if you just merge the two generated TOC's above with a new toc. ie:
"metadata": [
{
"src": [
{
"files": [
"Common/Common.csproj",
],
"src" : "../../../src/"
}
],
"dest": "../../../../../output/docs/api/Common",
"properties": { "TargetFramework": "net6.0" },
}, {
"src": [
{
"files": [
"Common.Utilities/Common.Utilities.csproj",
],
"src" : "../../../src/"
}
],
"dest": "../../../../../output/docs/api/Common.Utilities",
"properties": { "TargetFramework": "net6.0" },
},
]
Then above the two output folders, create a toc.yml with something like this:
- name: Common
href: Common/toc.yml
- name: Common.Utilities
href: Common.Utilities/toc.yml
This root folder is what you'll point the build to
[22-07-05 02:56:24.369]Warning:[MetadataCommand.ExtractMetadata](D:/Users/Lachee/Documents/Unity Projects/lachee-utilities/Packages/com.lachee.utilities/Docfx.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'D:\Users\Lachee\Documents\Unity Projects\lachee-utilities\Packages\com.lachee.utilities\Docfx.csproj' with message: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1;netstandard2.0;netcoreapp3.0;net45</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="Scripts/**/*.cs" />
</ItemGroup>
<ItemGroup>
<Compile Remove="**/*.meta" />
<None Remove="**/*.meta" />
<Compile Remove="**/*.asmdef" />
<None Remove="**/*.asmdef" />
<Compile Remove="Documentation~\**" />
<None Remove="Documentation~\**" />
</ItemGroup>
</Project>
{
"metadata": [
{
"src": [
{
"src": "..",
"files": [
"Docfx.csproj"
]
}
],
"dest": "api"
}
]
}