1

I've create a simple console application along with a simple docfx project. When I run the DocFX command to generate the documentation I get the following metadata warning and becuasue the warning leads to the documentation not being generated.

[18-06-05 05:52:41.715]Warning:MetadataCommand.ExtractMetadataWorkspace failed with: [Failure] Msbuild failed when processing the file 'E:\Files\tmp\docx\docfx_project\src\src.csproj' with message: C:\Program Files\dotnet\sdk\2.1.300\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets: (198, 5): Error loading lock file 'E:\Files\tmp\docx\docfx_project\src\obj\project.assets.json' : Object reference not set to an instance of an object.

later in the output you see

[18-06-05 05:52:42.467]Warning:[MetadataCommand.ExtractMetadata]No metadata is generated for src.

Anyone else run into this problem? How can I get metadata to generate?

To recreate the project is pretty simple:

  1. goto dotnet cli tools command line
  2. docfx init
  3. cd src
  4. dotnet new console
  5. cd ..
  6. docfx

I have installed and using the dotnet sdk 2.1.300

4

1 回答 1

2

在 .net 2.1 中,工具的使用发生了重大变化,这些工具现在已在全球范围内安装和使用,如下所示:

dotnet watch
dotnet user-secrets
dotnet sql-cache
dotnet dev-certs

docfx 的开发人员目前正在开发一个支持 .net 2.1 (docfx v3) 的版本:https ://github.com/dotnet/docfx/pull/2829

在这里您可以看到当前的实施状态:https ://github.com/dotnet/docfx/projects/1

因此,您的问题的答案是:到目前为止,您还不能将 docfx 与 .net 2.1 一起使用

于 2018-06-05T18:33:16.023 回答