docfx: All builds failing without any changes
Operating System: Windows + Linux
DocFX Version Used: docfx.console v2.59.3
Template used: default
Steps to Reproduce:
- Run docfx against any project.
Expected Behavior: Documentation generated.
Actual Behavior: Error / warning reported and no documentation generated. There are many files within the .csproj, and I have about 13 projects all experiencing the same issue with no explanation. These are all DevOps pipelines, and I have reproduced locally by installing the NuGet package / running DocFX generation.
Perhaps related to https://github.com/dotnet/sdk/issues/27059 - only reason I mention this is because both the argument issue and this DocFX issue began occurring on all my projects at the same time. If not this specific issue, perhaps some other change in a more recent net / msbuild version?
PS C:\Users\xxx.nuget\packages\docfx.console\2.59.3\tools> .\docfx.exe “C:\Development\xxx\docfx.json” --serve
[22-08-16 12:26:44.530]Info:[MetadataCommand.ExtractMetadata]Using msbuild C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin as inner compiler.
[22-08-16 12:26:44.758]Info:[MetadataCommand.ExtractMetadata]Loading projects…
[22-08-16 12:26:46.519]Warning:MetadataCommand.ExtractMetadataWorkspace failed with: [Failure] Msbuild failed when processing the file ‘C:\Development\xxx\Localization.csproj’ with message: Method not found: ‘System.ReadOnlySpan1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan1<Char>)’.
[22-08-16 12:26:46.975]Warning:[MetadataCommand.ExtractMetadata]Project ‘C:\Development\xxx\Localization.csproj’ does not contain any documents.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (4 by maintainers)
Hacky fix which works for me, basically the manual version of #8135 until there’s a release containing that:
lib/net461/System.Memory.dllinto the docfx installation directoryI think it’s fixed in #8135. Not sure if there’s any plans for a new release though. Imho it seems like an important fix to ship.
FYI a new release with #8135 has been released last week: https://github.com/dotnet/docfx/releases
I’m running into the same problem on Windows 11 and Visual Studio 2022 17.3.2. I’ve tried the following but still encountering the issue.
Anything else to try?
@CalvinWilkinson: I just unzip the release and execute
docfx.exedirectly (always on a Windows box, which may make a difference).