Visual Studio 2015 missing XML comments / documentation

我与影子孤独终老i 提交于 2019-11-30 22:53:45

问题


Is it me or are the XML comments missing for System.Linq in Visual Studio 2015? Because I can still find it on MSDN. But when typing, for example, this code:

var list = new List<string>();
list.Select(

IntelliSense doesn't provide the comments/documentation for any class/method/member/extension in the System.Linq namespace:

Here is a preview when hitting (Alt + )F12 to go to definition for a random extension method on Enumerable:
I think I didn't notice the docs in Visual Studio 2013 either. But I do remember them being there once upon a time, perhaps that was in Visual Studio 2012 or before?

EDIT: I've forgot to mention that I've Resharper 10 Ultimate installed in Visual Studio 2015. I've also had Resharper 8 and 9 installed in Visual Studio 2013.


回答1:


I had the same problem but for a whole framework (4.6). In fact, I missed all the XML files for the whole Framework assemblies in the folder "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6".

The problem was that I installed the Microsoft .NET Framework 4.6 Targeting Pack that I got from the MSDN download center, but I missed the other smaller msi package that got along. The main package only installs the necessary assemblies, and you have to install the other one (ENU, ITA, etc.) to get those XML files in the language chosen on the download page.




回答2:


The xml comments / documentation isn't broken but your intellisense is.

Go to definition for external types will only show you a version from metadata of the source code.

Which is why you get this at the the top:

#region Assembly System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll
#endregion

And it says [from metadata]:

I see the same going to definition on Select, but I do get more intellisense than in your screenshot:




回答3:


So, my workaround was to replace System.Core.xml. It worked. I downloaded from https://github.com/docascode/intellisense and replaced in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5



来源:https://stackoverflow.com/questions/35010743/visual-studio-2015-missing-xml-comments-documentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!