serilog/serilog · error · ArgumentNullException

Value cannot be null. (Parameter 'property')

Error message

Value cannot be null. (Parameter 'property')

What it means

Error "Value cannot be null. (Parameter 'property')" thrown in serilog/serilog.

Source

Thrown at src/Serilog/Events/LogEventProperty.cs:46

    /// <exception cref="ArgumentException">When <paramref name="name"/> is empty or only contains whitespace</exception>
    /// <exception cref="ArgumentNullException">When <paramref name="value"/> is <code>null</code></exception>
    public LogEventProperty(string name, LogEventPropertyValue value)
    {
        Guard.AgainstNull(value);
        EnsureValidName(name);

        Name = name;
        Value = value;
    }

    /// <summary>
    /// Construct a <see cref="LogEventProperty"/> from an existing <see cref="EventProperty"/> instance.
    /// </summary>
    /// <param name="property">The existing property.</param>
    /// <exception cref="ArgumentNullException">When <paramref name="property"/> is <code>default</code></exception>
    internal LogEventProperty(EventProperty property)
    {
        if (property.Equals(EventProperty.None)) throw new ArgumentNullException(nameof(property));

        Name = property.Name;
        Value = property.Value;
    }

    /// <summary>
    /// The name of the property.
    /// </summary>
    public string Name { get; }

    /// <summary>
    /// The value of the property.
    /// </summary>
    public LogEventPropertyValue Value { get; }

    /// <summary>
    /// Test <paramref name="name" /> to determine if it is a valid property name.
    /// </summary>

View on GitHub (pinned to 49b5339ce8)

When it happens

Trigger: Thrown at src/Serilog/Events/LogEventProperty.cs:46 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of serilog/serilog@49b5339ce8 (2026-08-04). Data as JSON: /data/errors/1cf307d89b08dca8.json. Report an issue: GitHub.