XML documentation must match the procedure signature

Properties
DC0005 Info Design Code Fix Ignore Obsolete

When a procedure has XML documentation comments , IntelliSense surfaces the <param> and <returns> tags in tooltips and signature help. If a <param> tag names a parameter that does not exist in the procedure, or a procedure parameter has no corresponding tag, callers see wrong parameter names at exactly the moment they rely on them — while reading the signature to fill in arguments.

Update the XML documentation to match the current procedure signature: rename, add, or remove <param> and <returns> tags as needed.

Example

The documented parameter Amount does not exist in the procedure — the actual parameter is Quantity:

codeunit 50100 MyCodeunit
{
    /// <summary>
    /// Calculates the total.
    /// </summary>
    /// <param name="Amount">The amount.</param>
    procedure CalculateTotal(Quantity: Decimal) // XML documentation must match the procedure signature [DC0005]
    begin
    end;
}

Update the <param> tag to match the actual parameter name:

codeunit 50100 MyCodeunit
{
    /// <summary>
    /// Calculates the total.
    /// </summary>
    /// <param name="Quantity">The quantity to calculate.</param>
    procedure CalculateTotal(Quantity: Decimal)
    begin
    end;
}

When the diagnostic is reported

The diagnostic fires only when XML documentation comments already exist on the procedure. If there are no XML doc comments at all, see DC0004 instead.

  • A <param> tag names a parameter that does not exist in the procedure.
  • A procedure parameter has no corresponding <param> tag.
  • A <returns> tag is present but the procedure has no return value.
  • The procedure has a return value but no <returns> tag.
  • A [TryFunction] procedure has no <returns> tag — TryFunction has an implicit boolean return value, so <returns> is expected.
  • Duplicate <param> or <returns> tags for the same element.

See also

  • DC0004 — Public procedures must include XML documentation comments