How do I display .NET / C# documentation similar to <summary></summary>?

Answered

I noticed that the general summaries of methods, classes, and types are missing when hovering over a .NET / C# class method or type. This means whenever I want to know more about one of these I have to manually search for it in the API docs online.

Am I doing something wrong here, or is this how Rider works natively?

Thanks in advance!

5
19 comments

Rider 2017.2
Build #RD-172.4144.1459, built on October 12, 2017
Licensed to <Removed>
Subscription is active until August 10, 2018
JRE: 1.8.0_152-release-915-b11 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Had the same problem in Rider 2017.1. Anything else I can provide? Where does Rider take the xmldoc from? I have VS2017 install on the same machine as well if that is any help.

2

@sirati97 it's a very bad advise from your side. People, don't follow it, it's destructing! You should set the only variable it's enough!! No need to replace several thousand strings!!

1
Avatar
Bartlomiej Dawidow

Same problem here:

JetBrains Rider 2018.3.1
Build #RD-183.5253.26, built on December 26, 2018
JRE: 1.8.0_152-release-1343-b26 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.2

Unity 2018.3.0f2

Note that the documentation works in a pure (non-Unity) .NET Core project.

1

You may either
 - call View->Quick Documentation

- navigate inside with Ctrl+Click - it will get you to decompiled sources.

In both cases if xmldoc is present ///summary info will be shown

 

0

If I use quick documentation on e.g. DateTime.Now all I get is:

public static DateTime Now { get; }

in struct DateTime

No summary or anything else is present. How do I fix so the documentation is shown?

Thanks!

0

@Olle, sorry for delayed response.
I have rechecked this, it seem to work at my machine by View ->Quick Documentation command

Could you please provide more info about your configuration?
Thanks!

0

@Olle, you may check the location of referenced System.dll
For my screenshot it is "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\" and check if there is mscorlib.dll and mscorlib.xml in that folder.

0

My paths looks the same (except .NET version 4.6) but I found that mscorlib.xml pointed to a path containing %PROGRAMFILESDIR%. That environment variable was not defined so I set it to correct directory. Then after a restart Rider started to show correct documentation. 

Problem solved, thanks for the help.

One question, why does the Quick Documentation window have such strange spacing after the headlines? It's like two unnecessary new lines efter Summary and Returns for instance.

0

I am glad your problem is solved, but could you please elaborate more on how it appeared so we could try to prevent it for other users?
Where was mscorlib.xml referenced with incorrect path? In the csproj? Please post some explanatory screenshot, if possible. Thanks in advance!

0

I stumbled on the same issue.
The problem is that if you look in the "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.2\" folder or whatever version of .NET you got and open mscorlib.xml, its content is the following

 

<?xml version="1.0" encoding="utf-8"?>

<doc redirect="%PROGRAMFILESDIR%Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\mscorlib.xml" />

 

as you can see, it redirect the documentation to the "global" .NET 4.x mscorlib.xml.

To make it work I had to add the PROGRAMFILESDIR environment variable with the value of "C:\Program Files (x86)\" (note the last slash is required)

 

0

Yeah Exactly the same Issue here still. Because of it I  thought that Xamarin is better....And though I've followed recommendations bug is still here (info in issue) I finally opened an issue here please everyone upvote since I believe it's highest priority issue... https://youtrack.jetbrains.com/issue/RIDER-11979

And here's another about extra spacing https://youtrack.jetbrains.com/issue/RIDER-3460

0

@Rulesprog thanks for the heads up

0

@Rulesprog I removed the picture, because you are right with that simply adding the PATH should work too. I overlooked that. 

 

Anyway, it is not true that it is destructive. Most of the dot net help files link to another to save disk space and all use this wildcard that rider cannot read. What I did is totally safe if you do not mess up. I only replaced strings in xml (help files) inside the folder in which the help files are located. 

 

0
Avatar
Gabriel Marques

Issue is still around...

https://i.imgur.com/CsQm4uS.png

https://i.imgur.com/wu0idas.png

 

Can't see the summary or exceptions thrown by the method :-(

0

Still featuring this issue. No provided solutions were helpful.

 

JetBrains Rider 2018.2.3
Build #RD-182.4231.496, built on September 13, 2018
JRE: 1.8.0_152-release-1248-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 7 6.1

0

I'm having the same issue in Rider 2019.2.3 on Mac - documentation is missing for .Net projects (but shows for .Net Core projects).

I've not been able to find a solution for Mac yet.

0

Hi Charles, 

Could you please try to set the %PROGRAMFILESDIR% environment variable and probably restart your Mac? 

Hope this helps! 

0

Please vote this request https://youtrack.jetbrains.com/issue/RIDER-11155
Rider needs to support the Mono documentation format.

0

It's amazing that something like broken docs is still not fixed. 

It's important to note that every doc file of q never versions of dotnet is affected by it. They all link to another xml file which cannot be resolved by rider because rider does not understand the wildcard.

Apparently the path is not set so you fix it by setting the path.

What I did and what is not recommended at all as there is a much easier and saver way above:
I used a notepad++ to fix that for all my files until rider updates. Other people noted that this is destructive if used incorrectly, so i removed the guide.  
(811 replacements for me)

-2

Please sign in to leave a comment.