1

我正在使用 VS Code 编写一个 dotnet 核心应用程序。一切正常,但是当智能感知启动时(或者我将鼠标悬停在系统 API 上),我没有得到这些方法的任何文档。我假设有一个扩展?Event VS Code 的 node.js 系统包含文档。

我一定是在搜索错误的术语,因为我什至找不到关于这个主题的讨论。

更新:2020 年 7 月 23 日感谢 omajid。我实际上是在使用 System.IO 的一些 api

虽然我有许多 dll 的 xml 文档,但不是那个程序集:

System.IO.MemoryMappedFiles.xml
System.IO.Pipes.dll
System.IO.Pipes.xml
System.IO.UnmanagedMemoryStream.dll
System.IO.dll
System.Linq.Expressions.dll
System.Linq.Expressions.xml
System.Linq.Parallel.dll
System.Linq.Parallel.xml
System.Linq.Queryable.dll
System.Linq.Queryable.xml

我想我会尝试重新安装 dotnet。

还缺少核心 dll 文档文件:

mscorlib.dll
netstandard.dll

安装后我仍然有问题。我可以在其他目录中找到其他语言的 System.IO.xml,如下所示:

.//dotnet/sdk/NuGetFallbackFolder/system.io/4.1.0/ref/netstandard1.5/fr/System.IO.xml
.//dotnet/sdk/NuGetFallbackFolder/system.io/4.1.0/ref/netstandard1.5/System.IO.xml
.//dotnet/sdk/NuGetFallbackFolder/system.io/4.1.0/ref/netstandard1.5/es/System.IO.xml 

7 月 26 日更新:我发现了部分问题。我的一个库是 netstandard2.0,另一个是 netstandard 2.1。较新的项目有帮助。请参阅问题https://github.com/dotnet/runtime/issues/39927

2020 年 8 月 19 日更新:该问题被标记为该问题的重复:https ://github.com/dotnet/standard/issues/1527

4

1 回答 1

1

文档是查找.xml.NET Core 安装中包含的文件。

对于每个命名空间,都有一个.xml文件和一个.dll文件。例如,在我的 .NET Core 安装中,这些文件是System.IO.Pipes

$ find /usr/lib64/dotnet -iname 'System.IO.Pipes*' | grep 'NETCore.App' | grep -v Access
/usr/lib64/dotnet/packs/Microsoft.NETCore.App.Ref/3.1.0/ref/netcoreapp3.1/System.IO.Pipes.dll
/usr/lib64/dotnet/packs/Microsoft.NETCore.App.Ref/3.1.0/ref/netcoreapp3.1/System.IO.Pipes.xml
/usr/lib64/dotnet/shared/Microsoft.NETCore.App/3.1.5/System.IO.Pipes.ni.{742a0de4-c892-41d7-a15d-0ecd8de52518}.map
/usr/lib64/dotnet/shared/Microsoft.NETCore.App/3.1.5/System.IO.Pipes.dll
/usr/lib64/dotnet/shared/Microsoft.NETCore.App/3.1.5/System.IO.Pipes.pdb

目标包目录 ( packs/Microsoft.NETCore.App.Ref) 包含参考程序集 ( System.IO.Pipes.dll) 和 XML 文档 ( System.IO.Pipes.xml)。如果缺少 XML 文档文件,听起来您的 .NET Core 分发已损坏。

你是如何安装 .NET Core 的?可以重新安装吗?如果问题仍然存在,您能否分享有关我们如何重现您的环境的更多信息?

不久前,我们在 Fedora Linux 上的 .NET Core 中遇到了这个错误:https ://bugzilla.redhat.com/show_bug.cgi?id=1831310

于 2020-07-23T01:00:11.193 回答