dotnet / dotnet/docfx

[Bug] .NET API bug - Nullable project throws error telling I should enable nullable

Open
#9,941 3 comments 0 reactions 0 assignees View on GitHub
dotnet
Dominant language
C#
Stars
4.4k
Forks
890
Avg merge
2h 9m
Merged PRs (30d)
11

Description

**Describe the bug**
`The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.` error is throw at GitHub actions when generating API reference.

**To Reproduce**
Steps to reproduce the behavior:
Just `docfx docfx.json` at GitHub Actions or `docfx metadata`

**Expected behavior**
API should be generated.

**Context (please complete the following information):**
- OS: Windows latest at GitHub actions
- Docfx version: 2.76.0
- .NET version: .NET 8

- `docfx.json` config
https://github.com/ncalc/ncalc/blob/master/docs/docfx.json

- Exceptions
https://github.com/ncalc/ncalc/actions/runs/9183960851/job/25255512510
At Build And Generation Documentation step
- Errors and warnings
https://github.com/ncalc/ncalc/actions/runs/9183960851/job/25255512510
At Build And Generation Documentation step
- .NET info
Not applicable, CI/CD.

**Additional context**
The error only happens at GitHub Actions. And I have nullable enabled.

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.