dotnet/runtime · warning

Option %s: '%s' missing property value

Error message

Option %s: '%s' missing property value

What it means

Printed by parse_args() when -p / --property is followed by a token that contains no '=' delimiter (prop.find('=') == npos). corerun requires the form key=value; a bare key is rejected. Parsing breaks and returns false.

Source

Thrown at src/coreclr/hosts/corerun/corerun.cpp:804

            {
                pal::fprintf(stderr, W("Option %s: missing path\n"), arg);
                break;
            }
        }
        else if (pal::strcmp(option, W("p")) == 0 || (pal::strcmp(option, W("property")) == 0))
        {
            i++;
            if (i >= argc)
            {
                pal::fprintf(stderr, W("Option %s: missing property\n"), arg);
                break;
            }

            string_t prop = argv[i];
            size_t delim_maybe = prop.find(W('='));
            if (delim_maybe == string_t::npos)
            {
                pal::fprintf(stderr, W("Option %s: '%s' missing property value\n"), arg, prop.c_str());
                break;
            }

            string_t key = prop.substr(0, delim_maybe);
            string_t value = prop.substr(delim_maybe + 1);
            config.user_defined_keys.push_back(std::move(key));
            config.user_defined_values.push_back(std::move(value));
        }
        else if (pal::strcmp(option, W("l")) == 0 || (pal::strcmp(option, W("preload")) == 0))
        {
            i++;
            if (i >= argc)
            {
                pal::fprintf(stderr, W("Option %s: missing shared library path\n"), arg);
                break;
            }

            string_t library = argv[i];

View on GitHub (pinned to 290d5ab72c)

Solutions

  1. Use the exact 'key=value' form: 'corerun -p System.GC.Server=true App.dll'.
  2. For an empty value use 'key=' (the self-test explicitly allows this).
  3. Quote the whole token if the value contains spaces: -p "key=a b".

Example fix

# before
corerun -p System.GC.Server App.dll
# after
corerun -p System.GC.Server=true App.dll
Defensive patterns

Strategy: validation

Validate before calling

# validate every -p token contains '='
prev=
for a in "$@"; do
  if [ "$prev" = "-p" ] || [ "$prev" = "--property" ]; then
    case "$a" in *=*) : ;; *) echo "property '$a' missing =value"; exit 2 ;; esac
  fi
  prev="$a"
done

Prevention

When it happens

Trigger: User runs 'corerun -p System.GC.Server App.dll' (missing '=value'), or 'corerun -p key' with the value on a separate token. The check is specifically that a single '=' exists in the token immediately after -p.

Common situations: Forgot the '=value' half; tried to pass key and value as two separate arguments; used a space instead of '='.

Related errors


AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06). Data as JSON: /api/errors/a3fbecbd62683355. Report an issue: GitHub.