2

If I type something in VisualStudio2010 like DataSet1. I get a list of all available Methods and Properties (Intellisense). This works fine. But if I select a method or property in this list I don't get the description of if.

For Example if I have something like:

public class Dummy
{
    /// <summary>
    /// This is a test-method
    /// </summary>
    public string Do { get; set; }
}

And the usage is:

Dummy dummy = new Dummy();
dummy.Do = "dummy";

At the moment when I type dummy.Do I want to have the Property-comment to be displayed in the list of intellisense. Normally this is shown by a tooltip.

How can I turn this behavior on?

Tomtom
  • 9,087
  • 7
  • 52
  • 95

5 Answers5

2

Look in Tools > Options > Text Editor > C#. Make sure Parameter information is checked.

zsgalusz
  • 76
  • 5
2

Make sure the XML documentation file: checkbox is checked under the Build tab in your project properties. Visual Studio will automatically add this file when you reference your DLL.

Willie Visagie
  • 171
  • 1
  • 14
1
  • Does the feature work for properties like String.Length? This helps determine if the problem affects all properties or just user-defined properties.

  • If class Dummy is actually part of a separate library which your project is referencing, you may need to include the XML documentation file along with the DLL assembly.

  • Do you have any Visual Studio extensions installed? Some extensions, including but not limited to ReSharper, Productivity Power Tools, and Code Contracts Editor Extensions VS2010 modify the IntelliSense presentation in ways that could impact this feature. Try disabling any extensions you have installed and restart Visual Studio to see if the problem is resolved. If the feature starts working again, you can start narrowing down the problem to find the particular extension responsible for the problem.

Sam Harwell
  • 97,721
  • 20
  • 209
  • 280
  • The feature doesn't work for String.Length or all other Properties and Methods of the .net-framework. I have installed the resharper and the visual studio power tools. but on another machine, where the same tools are installed, everything works fine. this must be something with the configuration, but I don't know what. – Tomtom May 13 '13 at 18:57
  • @Tomtom ReSharper completely replaces the IntelliSense functionality with one developed by a third party. Try disabling or uninstalling it and see if things work again, and if so this is probably a question for JetBrains (developers of ReSharper). – Sam Harwell May 13 '13 at 22:04
1

zsgalusz is correct - that is how you turn it on.

If the comment is still not showing, make sure that the XML syntax (comment) is correct. VS (to my knowledge) doesn't identify errors in the syntax, so its quite easy to make a mistake and not notice it. In most cases, just one or more characters in the wrong place will cause it to not work for that method/variable/class, etc... For example:

/// <summary>
/// Adds a Platform Fee to one of the platform-fee dataGridViews.
/// </summary>
/// <param name="customFee">The Platform Fee being added.</param>
/// <param name="platformGroup">
/// DataGridView the Platform Fee is being added to.
/// 0 = existing platform dataGridView.
/// 1 = recommended platform dataGridView.
/// </param>
/// <exception cref=ArgumentException""></exception>

Looks correct right? Except ArgumetnException is not within the '"' characters thus the XML is invalid and intellisense wont show the comment.

Robert
  • 93
  • 1
  • 7
0

I've found the reason intellisense didnt show my comments was because my comments were too long. Try shortening the summary, param, returns, etc comments and you may see your comments afterwards

Jeff Moretti
  • 613
  • 5
  • 6