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"
}
]
}
Hi, I'm setting up a docs pipeline for TypeScript using https://api-extractor.com/ and DocFX. I tried the tool on this page before deciding to use API-Extractor but was unsuccessful: https://dotnet.github.io/docfx/tutorial/universalreference/gen_doc_for_ts.html
Is there a reason API extractor isn't the recommendation on this page? It seems to be the tool officially used by microsoft but I can't find much resources about setting up a pipeline using it.
Hey folks,
Is it okay to ask questions related to docfx issues here?
I'm building documentation with docfx for a .NET Core solution (the projects are targeting net5.0
and net6.0
).
I'm doing this on Linux in a Docker container, the container is based on mcr.microsoft.com/dotnet/sdk:6.0
, and has a couple of extra things:
nuget.exe
is downloadeddocfx.console
and SQLitePCLRaw.core
are installed with nuget
When I try to build the docs by running
mono ./docfx/docfx.console/tools/docfx.exe ./docs/docfx.json
The documentation is built, but there are two Warnings in the output that I'm trying to chase down.
I'm getting these:
[22-12-13 03:48:42.333]Warning:[MetadataCommand.ExtractMetadata](/app/src/MySolution/MySolution.Common.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file '/app/src/MySolution/MySolution.csproj' with message: /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets: (1232, 5): The reference assemblies for ".NETFramework,Version=v6.0" were not found. You might be using an older .NET SDK to target .NET 5.0 or higher. Update Visual Studio and/or your .NET SDK.
Yet the SDK seems to be installed if I check it with dotnet
:
dotnet --list-sdks
6.0.403 [/usr/share/dotnet/sdk]
Or to make it work with Mono I need some extra config?
And the other error I'm constantly seeing in the output is this:
[22-12-13 03:48:50.131]Warning:[MetadataCommand.ExtractMetadata](/app/src/MySolution/MySolution.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file '/app/src/MySolution/MySolution.csproj' with message: /usr/lib/mono/msbuild/15.0/bin/Microsoft.Common.CurrentVersion.targets: (1733, 5): The "GetReferenceNearestTargetFrameworkTask" task failed unexpectedly.
System.MissingMethodException: Method not found: NuGet.Frameworks.NuGetFramework NuGet.Frameworks.NuGetFramework.ParseComponents(string,string)
at NuGet.Build.Tasks.GetReferenceNearestTargetFrameworkTask.Execute () [0x00142] in <284aae14d5034455899563954b017376>:0
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00029] in <3fa5db086dc941c1a57d0f5b812004f0>:0
...
Anybody has any ideas what these might be caused by?
The Dockerfile
for the image in which I'm trying to do this build looks like this:
FROM mcr.microsoft.com/dotnet/sdk:6.0
RUN apt update && \
apt install -y apt-transport-https dirmngr && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb https://download.mono-project.com/repo/debian stable-buster main" | tee /etc/apt/sources.list.d/mono-official-stable.list && \
apt update && \
apt install -y mono-devel mono-runtime msbuild curl && \
curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe && \
echo '#!/bin/bash\nmono /usr/local/bin/nuget.exe "$@"' > /usr/bin/nuget && \
chmod +x /usr/bin/nuget