Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All builds failing without any changes #8136

Closed
curt-w opened this issue Aug 16, 2022 · 19 comments
Closed

All builds failing without any changes #8136

curt-w opened this issue Aug 16, 2022 · 19 comments
Labels
dotnet Generate .NET API reference docs

Comments

@curt-w
Copy link

curt-w commented Aug 16, 2022

Operating System: Windows + Linux

DocFX Version Used: docfx.console v2.59.3

Template used: default

Steps to Reproduce:

  1. 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 dotnet/sdk#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)'.
[22-08-16 12:26:46.975]Warning:[MetadataCommand.ExtractMetadata]Project 'C:\Development\xxx\Localization.csproj' does not contain any documents.

@paulushub
Copy link

Most likely related to #8097

@curt-w
Copy link
Author

curt-w commented Aug 16, 2022

Agree - just came across #8097 myself.

@Lachee
Copy link

Lachee commented Aug 16, 2022

I just had this issue occur on my GitHub Action too

@jskeet
Copy link

jskeet commented Aug 18, 2022

Hacky fix which works for me, basically the manual version of #8135 until there's a release containing that:

  • Download System.Memory NuGet package version 4.5.5
  • Extract lib/net461/System.Memory.dll into the docfx installation directory
  • Modify docfx.exe.config to add the following binding redirect:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
      </dependentAssembly>
    </assemblyBinding>

@CalvinWilkinson
Copy link

Hacky fix which works for me, basically the manual version of #8135 until there's a release containing that:

  • Download System.Memory NuGet package version 4.5.5
  • Extract lib/net461/System.Memory.dll into the docfx installation directory
  • Modify docfx.exe.config to add the following binding redirect:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
      </dependentAssembly>
    </assemblyBinding>

@jskeet I am using the dotnet tool. Is there a hacky fix/workaround for this situation?

@jskeet
Copy link

jskeet commented Aug 23, 2022

@CalvinWilkinson: I'm afraid I haven't tried using docfx that way at all.

@CalvinWilkinson
Copy link

@jskeet I am using it as a dotnet tool which works great, but because I am building and publishing the docfx site using GitHub actions. How are you using it?

@jskeet
Copy link

jskeet commented Aug 23, 2022

@CalvinWilkinson: I just unzip the release and execute docfx.exe directly (always on a Windows box, which may make a difference).

@OskarKlintrot
Copy link
Contributor

@CalvinWilkinson: Isn't the dotnet tool v3 only?

@CalvinWilkinson
Copy link

CalvinWilkinson commented Aug 23, 2022

@OskarKlintrot You know what, you are correct. I think it is.

I was just interested in different approaches because I am running into issues.

@ianceicys
Copy link

ianceicys commented Aug 26, 2022

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?

Hacky fix which works for me, basically the manual version of #8135 until there's a release containing that:

  • Download System.Memory NuGet package version 4.5.5
  • Extract lib/net461/System.Memory.dll into the docfx installation directory
  • Modify docfx.exe.config to add the following binding redirect:
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
      </dependentAssembly>
    </assemblyBinding>

@johnholliday
Copy link

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.

Spent the past 2 hours trying to get past this. Any other ideas?

@curt-w
Copy link
Author

curt-w commented Aug 29, 2022

I disabled all Docfx build processes and am living with stale docs for now. Dead in water.

@OskarKlintrot
Copy link
Contributor

I 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.

@CalvinWilkinson
Copy link

I 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.

I agree with this. I can't even get my new doc site up and running because of this. So I am just patiently waiting.

@MihaZupan
Copy link
Member

FYI a new release with #8135 has been released last week: https://github.com/dotnet/docfx/releases

@CalvinWilkinson
Copy link

@MihaZupan Thanks for the heads up!!
I will be picking this issue back up soon. I will retry some of the site generation. If I run into anything different or with any other issues, I will definitely post about them.

@yufeih yufeih added the dotnet Generate .NET API reference docs label Dec 15, 2022
@yufeih
Copy link
Contributor

yufeih commented Feb 1, 2023

Did this issue still occur in the latest release?

@CalvinWilkinson
Copy link

Thanks for the reminder!!
I am in the middle of trying to complete a release. Once I am done I will poke around and try it out. 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet Generate .NET API reference docs
Projects
None yet
Development

No branches or pull requests

10 participants