-
Notifications
You must be signed in to change notification settings - Fork 886
Description
Describe the bug
The problem is that DocFX does not see the NuGet reference as a resource, and it is not generating metadata.
So the usage looks like: A (documentation) -> B (base project) -> C (Nuget reference)
In our case, for local run, we are using Debug, so it's fine because we can execute the script from local to build the whole solution, including documentation (all references are directly to projects, not NuGet packages)
But when building on Azure Pipeline, we always build a solution as a Release with all NuGet references.
Configs
[ProjectB.csproj]
<ItemGroup Condition="'$(Configuration)'=='Debug'">
<ProjectReference Include="..\..\..\Common\Source\Core.Messages\Core.Messages.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Release'">
<PackageReference Include="Core" Version="*" />
</ItemGroup>
[docfx.json]
{
"metadata": [
{
"allowCompilationErrors": true, // used for skipping errors as a temp bypass
"src": [
{
"files": ["ProjectB/ProjectB.csproj"],
"src": "../"
}
],
"dest": "api"
}
],
"build": {
"content": [
{
"files": [ "*.yml", "*.md", "api/*.yml", "api/*.md", "**/*.yml", "**/*.md" ]
}
],
"resource": [
{
"files": [ "articles/*.jpg", "articles/*.docx", "articles/*.pdf", "articles/**/*.zip" ]
}
],
"template": "statictoc",
"dest": "_site"
}
}
To Reproduce
Steps to reproduce the behavior:
- Create project
- Publish NuGet
- Geneare metadata/api
- Build doc
Expected behavior
Should generate metadata without problems.
Context (please complete the following information):
- OS: Windows
- Docfx version: [e.g. 2.59.0]
Additional context
N/A