问题
Since a month ago, my VS doesn't seem to want to display the summary info in tooltips for any system methods or classes when I hover them with my mouse.
I had ReSharper installed and started noticing this problem. I assumed that ReSharper disabled the default method descriptions, so I wasn't thinking much further about it, only considering it a mere annoyance.
After removing ReSharper though, the problem persisted.
VS now only shows descriptions for my own methods which I've added a <summary> tag for and any descriptions from NuGet packages, but not system methods like Where, Encoding.GetString, etc.
I've tried repairing VS, resetting settings, un-/checking checkboxes in Options > Text Editor > General, but to no avail.
Has anyone had a similar problem?
回答1:
This looks more like a framework issue rather that a VS/R# issue. If neither one of them can load the description strings, it probably means the description XML files are missing.
Check if you see the XML files in:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2
If you don't, then reinstall the framework to fix the issue.
Link to .NET Framework 4.5.2 Developer Pack: https://www.microsoft.com/en-us/download/details.aspx?id=42637
回答2:
Try to activate the 'Statement completion' checkboxes in Options > Text Editor > All Languages > General as in the following screenshot:
回答3:
Also, check that your project is referencing the libraries in the C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\ folder. You can do that by selecting each project reference and viewing it in the property window, or by editing your project file with a text editor.
I had one case where my project had references to the actual runtime framework located at C:\Windows\Microsoft.NET\Framework\ which does not have the associated .xml files.
回答4:
After removing ReSharper from VS, it will be a framework issue, because in coresponding folder C:\Program Files(x86)\ReferenceAssemblies\Microsoft\Framework\.NETFramework\ will be absent demanded *.xml files (You can simple check it by look this folder, as wrote before @Lucas Trzesniewski ).
Also you can check it in VS by simple press F12 on any standart type or method (e.g. Console.WriteLine), you will see only list of methods in assembly, w/o any comments (also you can find at the top of page which assembly used by your current project, it version and location).
If you using for your project the last version Framework from your computer, you can simple decide this problem by reinstall it (coresponding "Microsoft .NET Framework 4.x.x Developer Pack").
But if you want reinstall some previous version (not the last), it can't be made simply, because the installation process can be blocked with the next explanation:
.NET Framework 4.5.x/4.6.x/4.7.x (ENU) or a later version is already installed on this computer.
You can use the next workaround:
Run installation package with key "uninstall" (e.g. for 4.5.2 - NDP452-KB2901951-x86-x64-DevPack.exe /uninstall
After that, the installation programm (on the last step before begin real work) give you selection from two option: Recovery or Uninstall, I highly recommend choosing the Recovery, because Microsoft not recommend to remove not the most last Framework.
P.S>
Also you can select language which will be installed from pack, because NDP452-KB2901951-x86-x64-DevPack.exe is Multi-Languages pack, by using addative option /lcid 1033 (for en-US).
All possible options you can recieve by key /?, but you must wait some time that your computer will be unzip the installation pack fully (archive near 400Mb), help information will be shown at separate window.
来源:https://stackoverflow.com/questions/37500027/visual-studio-not-showing-intellisense-descriptions-anymore