.net-core - DocFx Error after installing dotnet core 2.1.300
问题描述
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:
- goto dotnet cli tools command line
- docfx init
- cd src
- dotnet new console
- cd ..
- docfx
I have installed and using the dotnet sdk 2.1.300
解决方案
在 .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 一起使用
推荐阅读
- cmake - CMake使用正则表达式排除目录
- typescript - 获取最后修改的 blob,而不是所有 blob
- c++ - 如何以类似的方式处理不同的模板?
- python - Jupyter notebook ImportError: No module named enum
- python - Python pandas 框架 - 列表对象到 CSV 转换
- sql - Oracle - 列出每个月的每一天和几个小时
- javascript - 在Javascript中,如何知道当前字体不支持的字符并在浏览器中显示为框
- python - 如何在python中将字典列表格式化为嵌套字典
- python - 在numpy数组的每N个元素中随机选择一个元素
- python - 喀拉斯 | 形状 (None, 1) 和 (None, 10) 不兼容