dotnet/runtime · warning
Option %s: missing property
Error message
Option %s: missing property
What it means
Printed by parse_args() when -p / --property is the LAST token (i >= argc after i++). The option needs a following 'key=value' argument that is absent. Parsing breaks and returns false.
Source
Thrown at src/coreclr/hosts/corerun/corerun.cpp:796
if (pal::strcmp(option, W("c")) == 0 || (pal::strcmp(option, W("clr-path")) == 0))
{
i++;
if (i < argc)
{
config.clr_path = argv[i];
}
else
{
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))
{View on GitHub (pinned to 290d5ab72c)
Solutions
- Provide the property as 'key=value' immediately after -p, e.g. 'corerun -p System.GC.Server=true App.dll'.
- Quote the whole key=value if the value has spaces: -p "FancyProp=/usr/first last/root".
- Repeat -p for multiple properties; don't leave a trailing -p.
Example fix
# before corerun -p App.dll # after corerun -p System.GC.Server=true App.dll
Defensive patterns
Strategy: validation
Validate before calling
# ensure -p/--property is never the trailing token
if [ "${@: -1}" = "-p" ] || [ "${@: -1}" = "--property" ]; then
echo '-p requires a following key=value'; exit 2
fi Prevention
- Always follow -p with a key=value token.
- Use CORE_ROOT for runtime location instead of stacking many -p options.
- Validate the option immediately precedes its value in scripts.
When it happens
Trigger: User runs 'corerun -p' with nothing after, or '--property' as the final token before where the assembly would go.
Common situations: Forgotten property value; copy-paste from docs that broke the line before the value; trailing -p at end of command.
Related errors
- Option %s: '%s' missing property value
- Option %s: invalid form
- Option %s: missing path
- Option %s: missing shared library path
- Option %s: missing .env file path
AI-assisted analysis of dotnet/runtime@290d5ab72c (2026-08-06).
Data as JSON: /api/errors/6b307a9bbcc206cb.
Report an issue: GitHub.