Docfx: Docfx keeps generating outdated documentation (possibly due to Microsoft.NET.Sdk not being found?)

Created on 4 May 2019  Â·  12Comments  Â·  Source: dotnet/docfx

Operation System: Windows

DocFX Version Used: 2.42.0

Template used: default

Steps to Reproduce:

  1. Remove some class from your code
  2. Rebuild the documentation
  3. Notice it still generates documentation for the class you removed in step 1

Its also not picking up new classes or changes in existing classes. There seems to be some broken cache somewhere thats not getting cleared correctly but I cannot find it.

Expected Behavior:
Up to date generated documentation

Actual Behavior:
Outdated generated documentation

Area-Metadata stale

Most helpful comment

So I am not able to run DocFx headlessly from my CI build server if my build server does not have VS2017 on it? Is there a version of DocFx that doesn't have external dependencies? A portable executable or something?

Did this dependency requirement change recently? We had been using DocFx on our CI servers for quite some time, starting a little over a year ago.

All 12 comments

It seems that generating the metadata is broken (maybe this has to do with the docs not getting updated?):

PS C:\git\Singularity\src\Docs> C:\Users\Rick-\.nuget\packages\docfx.console\2.42.0\tools\docfx metadata
[19-05-04 10:10:43.046]Info:Config file docfx.json found, start generating metadata...
[19-05-04 10:10:43.261]Info:[ExtractMetadata]Using msbuild C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin as inner compiler.
[19-05-04 10:10:43.461]Info:[ExtractMetadata]Loading projects...
[19-05-04 10:10:44.271]Warning:[ExtractMetadata](C:/git/Singularity/src/Duality/Source/Code/Singularity.Duality/Singularity.Duality.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:\git\Singularity\src\Duality\Source\Code\Singularity.Duality\Singularity.Duality.csproj' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.  C:\git\Singularity\src\Duality\Source\Code\Singularity.Duality\Singularity.Duality.csproj
[19-05-04 10:10:44.333]Warning:[ExtractMetadata](C:/git/Singularity/src/Singularity/Singularity.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:\git\Singularity\src\Singularity\Singularity.csproj' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.  C:\git\Singularity\src\Singularity\Singularity.csproj
[19-05-04 10:10:44.338]Warning:[ExtractMetadata](C:/git/Singularity/src/Singularity.Microsoft.DependencyInjection/Singularity.Microsoft.DependencyInjection.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:\git\Singularity\src\Singularity.Microsoft.DependencyInjection\Singularity.Microsoft.DependencyInjection.csproj' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.  C:\git\Singularity\src\Singularity.Microsoft.DependencyInjection\Singularity.Microsoft.DependencyInjection.csproj
[19-05-04 10:10:44.341]Warning:[ExtractMetadata]Project 'C:\git\Singularity\src\Singularity\Singularity.csproj' does not contain any documents.
[19-05-04 10:10:44.344]Warning:[ExtractMetadata]Project 'C:\git\Singularity\src\Duality\Source\Code\Singularity.Duality\Singularity.Duality.csproj' does not contain any documents.
[19-05-04 10:10:44.344]Warning:[ExtractMetadata]Project 'C:\git\Singularity\src\Singularity.Microsoft.DependencyInjection\Singularity.Microsoft.DependencyInjection.csproj' does not contain any documents.
[19-05-04 10:10:44.361]Info:[ExtractMetadata]Cache for C:/git/Singularity/src/Duality/Source/Code/Singularity.Duality/Singularity.Duality.csproj,C:/git/Singularity/src/Singularity.Microsoft.DependencyInjection/Singularity.Microsoft.DependencyInjection.csproj,C:/git/Singularity/src/Singularity/Singularity.csproj in C:\git\Singularity\src\Duality\Source\Code\Singularity.Duality\obj\xdoc\cache\final\628843773 is corrupted, rebuild...
[19-05-04 10:10:44.362]Info:[ExtractMetadata]Generating metadata for each project...
[19-05-04 10:10:44.532]Info:[ExtractMetadata]'C:/git/Singularity/src/Singularity/Singularity.csproj' keep up-to-date since '2019-05-04 10:04:35', cached intermediate result 'C:/git/Singularity/src/Singularity/obj/xdoc/cache/obj\wy43rmbq.k1p' is used.
[19-05-04 10:10:44.618]Info:[ExtractMetadata]'C:/git/Singularity/src/Duality/Source/Code/Singularity.Duality/Singularity.Duality.csproj' keep up-to-date since '2019-05-04 10:04:35', cached intermediate result 'C:/git/Singularity/src/Duality/Source/Code/Singularity.Duality/obj/xdoc/cache/obj\wbtzgrgb.sb0' is used.
[19-05-04 10:10:44.619]Info:[ExtractMetadata]'C:/git/Singularity/src/Singularity.Microsoft.DependencyInjection/Singularity.Microsoft.DependencyInjection.csproj' keep up-to-date since '2019-05-04 10:04:35', cached intermediate result 'C:/git/Singularity/src/Singularity.Microsoft.DependencyInjection/obj/xdoc/cache/obj\2oixalib.35b' is used.
[19-05-04 10:10:44.623]Warning:[ExtractMetadata]No metadata is generated for Singularity,Singularity.Duality,Singularity.Microsoft.DependencyInjection.
[19-05-04 10:10:44.655]Info:Completed in 1410.5233 milliseconds


Build succeeded with warning.
[19-05-04 10:10:44.660]Warning:[ExtractMetadata](C:/git/Singularity/src/Duality/Source/Code/Singularity.Duality/Singularity.Duality.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:\git\Singularity\src\Duality\Source\Code\Singularity.Duality\Singularity.Duality.csproj' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.  C:\git\Singularity\src\Duality\Source\Code\Singularity.Duality\Singularity.Duality.csproj
[19-05-04 10:10:44.660]Warning:[ExtractMetadata](C:/git/Singularity/src/Singularity/Singularity.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:\git\Singularity\src\Singularity\Singularity.csproj' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.  C:\git\Singularity\src\Singularity\Singularity.csproj
[19-05-04 10:10:44.661]Warning:[ExtractMetadata](C:/git/Singularity/src/Singularity.Microsoft.DependencyInjection/Singularity.Microsoft.DependencyInjection.csproj)Workspace failed with: [Failure] Msbuild failed when processing the file 'C:\git\Singularity\src\Singularity.Microsoft.DependencyInjection\Singularity.Microsoft.DependencyInjection.csproj' with message: The SDK 'Microsoft.NET.Sdk' specified could not be found.  C:\git\Singularity\src\Singularity.Microsoft.DependencyInjection\Singularity.Microsoft.DependencyInjection.csproj
[19-05-04 10:10:44.662]Warning:[ExtractMetadata]Project 'C:\git\Singularity\src\Singularity\Singularity.csproj' does not contain any documents.
[19-05-04 10:10:44.662]Warning:[ExtractMetadata]Project 'C:\git\Singularity\src\Duality\Source\Code\Singularity.Duality\Singularity.Duality.csproj' does not contain any documents.
[19-05-04 10:10:44.662]Warning:[ExtractMetadata]Project 'C:\git\Singularity\src\Singularity.Microsoft.DependencyInjection\Singularity.Microsoft.DependencyInjection.csproj' does not contain any documents.
[19-05-04 10:10:44.663]Warning:[ExtractMetadata]No metadata is generated for Singularity,Singularity.Duality,Singularity.Microsoft.DependencyInjection.
        7 Warning(s)
        0 Error(s)

Tried setting $env:MSBUILD_EXE_PATH to a couple of different dotnet core sdks (from 2.1 to 3.0) but they all produce the same error.

EDIT: fixed it with the following sdk:

$env:MSBUILD_EXE_PATH = "C:\Program Files\dotnet\sdk\1.1.13\MSBuild.dll"

Then you can run:

C:\Users\Rick-\.nuget\packages\docfx.console\2.42.0\tools\docfx metadata

Does this simply means docfx does not support the newer dotnet core versions? Would be nice if this was actually documented clearly and the error messages would point you to this fact.

Not it need VS2017 msbuild to make build parse. Dotnet core alone is not enough. It is documented here: https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html

I had VS2017 installed and also tried it with the VS2017 build tools but it did not work without setting that environment variable

Thank you for the information. Looks like the document is out of date... As #4469 suggests, docfx need "ASP.NET and web development" when installing VS2017. Could you try this out?

So I am not able to run DocFx headlessly from my CI build server if my build server does not have VS2017 on it? Is there a version of DocFx that doesn't have external dependencies? A portable executable or something?

Did this dependency requirement change recently? We had been using DocFx on our CI servers for quite some time, starting a little over a year ago.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

Closing this issue after a prolonged period of inactivity. If you still think this issue is relevant, please feel free to ping a maintainer or leave a comment.

With new VS2019 supported, I believe the minimal dependency required is Build Tools for Visual Studio 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

Closing this issue after a prolonged period of inactivity. If you still think this issue is relevant, please feel free to ping a maintainer or leave a comment.

Sent from AT&T Yahoo Mail for iPhone

On Tuesday, February 4, 2020, 10:30 PM, stale[bot] notifications@github.com wrote:

Closing this issue after a prolonged period of inactivity. If you still think this issue is relevant, please feel free to ping a maintainer or leave a comment.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Was this page helpful?
0 / 5 - 0 ratings