{"record":{"id":"6b307a9bbcc206cb","repo":"dotnet/runtime","slug":"option-s-missing-property","errorCode":null,"errorMessage":"Option %s: missing property\n","messagePattern":"Option (.+?): missing property\n","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/coreclr/hosts/corerun/corerun.cpp","lineNumber":796,"sourceCode":"        if (pal::strcmp(option, W(\"c\")) == 0 || (pal::strcmp(option, W(\"clr-path\")) == 0))\n        {\n            i++;\n            if (i < argc)\n            {\n                config.clr_path = argv[i];\n            }\n            else\n            {\n                pal::fprintf(stderr, W(\"Option %s: missing path\\n\"), arg);\n                break;\n            }\n        }\n        else if (pal::strcmp(option, W(\"p\")) == 0 || (pal::strcmp(option, W(\"property\")) == 0))\n        {\n            i++;\n            if (i >= argc)\n            {\n                pal::fprintf(stderr, W(\"Option %s: missing property\\n\"), arg);\n                break;\n            }\n\n            string_t prop = argv[i];\n            size_t delim_maybe = prop.find(W('='));\n            if (delim_maybe == string_t::npos)\n            {\n                pal::fprintf(stderr, W(\"Option %s: '%s' missing property value\\n\"), arg, prop.c_str());\n                break;\n            }\n\n            string_t key = prop.substr(0, delim_maybe);\n            string_t value = prop.substr(delim_maybe + 1);\n            config.user_defined_keys.push_back(std::move(key));\n            config.user_defined_values.push_back(std::move(value));\n        }\n        else if (pal::strcmp(option, W(\"l\")) == 0 || (pal::strcmp(option, W(\"preload\")) == 0))\n        {","sourceCodeStart":778,"sourceCodeEnd":814,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/hosts/corerun/corerun.cpp#L778-L814","documentation":"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.","triggerScenarios":"User runs 'corerun -p' with nothing after, or '--property' as the final token before where the assembly would go.","commonSituations":"Forgotten property value; copy-paste from docs that broke the line before the value; trailing -p at end of command.","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."],"exampleFix":"# before\ncorerun -p App.dll\n# after\ncorerun -p System.GC.Server=true App.dll","handlingStrategy":"validation","validationCode":"# ensure -p/--property is never the trailing token\nif [ \"${@: -1}\" = \"-p\" ] || [ \"${@: -1}\" = \"--property\" ]; then\n  echo '-p requires a following key=value'; exit 2\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["coreclr","corerun","cli","argument-parsing","property"],"analyzedSha":"290d5ab72cc1102813fbc0406fb186ceadabc340","analyzedAt":"2026-08-06T19:57:01.276Z","schemaVersion":2},"datasetVersion":"2026-08-06T23:17:07.152Z"}