dotnet / docfx

Static site generator for .NET API documentation.
https://dotnet.github.io/docfx/
MIT License
4.06k stars 864 forks source link

[Bug] DocFX has errors about missing assembly references. Unsure why that is. #9379

Closed Tape-Worm closed 1 year ago

Tape-Worm commented 1 year ago

Describe the bug So, I'm trying to compile my documentation for my graphics API. And up until now (I haven't done this for some time), it's worked perfectly. Now, I'm getting a ton of errors about missing references and warnings about .NETFramework 4.8. My project multi-targets .NET 6 and Framework 4.8, but ultimately that should not matter.

To Reproduce Steps to reproduce the behavior: calling docfx metadata is sufficient for the errors to appear.

Expected behavior My documentation to be generated in the _site directory.

Context (please complete the following information):

Additional context I've attached the log output of docfx. docfx.log

And here's my docfx.json: docfx.json

Is there a bug, or am I just dumb and have missed something?

Tape-Worm commented 1 year ago

And don't you just absolutely hate it when you discover the problem after you post a message? I know I do.

So, as you can guess, I found the issue. If I remove this:

      "properties": {
        "TargetFramework": "net6.0"
      }

From my docfx.json, everything builds perfectly. While keeping it in there, causes errors. I don't know if that's a bug or not. But the documentation states that if you have a multitarget setup, you should have that in there. And I do have a multitarget setup, so yeah, I'd have expected it to work.

That said, feel free to close this if it isn't a bug.