dotnet / dotnet/docfx

[Bug] NuGet not seen on metadata gen

Open
#11,038 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 11m
Merged PRs (30d)
10

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]
```

```

[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:
1. Create project
2. Publish NuGet
3. Geneare metadata/api
4. 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.