{"record":{"id":"a3fbecbd62683355","repo":"dotnet/runtime","slug":"option-s-s-missing-property-value","errorCode":null,"errorMessage":"Option %s: '%s' missing property value\n","messagePattern":"Option (.+?): '(.+?)' missing property value\n","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/coreclr/hosts/corerun/corerun.cpp","lineNumber":804,"sourceCode":"            {\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        {\n            i++;\n            if (i >= argc)\n            {\n                pal::fprintf(stderr, W(\"Option %s: missing shared library path\\n\"), arg);\n                break;\n            }\n\n            string_t library = argv[i];","sourceCodeStart":786,"sourceCodeEnd":822,"githubUrl":"https://github.com/dotnet/runtime/blob/290d5ab72cc1102813fbc0406fb186ceadabc340/src/coreclr/hosts/corerun/corerun.cpp#L786-L822","documentation":"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.","triggerScenarios":"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.","commonSituations":"Forgot the '=value' half; tried to pass key and value as two separate arguments; used a space instead of '='.","solutions":["Use the exact 'key=value' form: 'corerun -p System.GC.Server=true App.dll'.","For an empty value use 'key=' (the self-test explicitly allows this).","Quote the whole token if the value contains spaces: -p \"key=a b\"."],"exampleFix":"# before\ncorerun -p System.GC.Server App.dll\n# after\ncorerun -p System.GC.Server=true App.dll","handlingStrategy":"validation","validationCode":"# validate every -p token contains '='\nprev=\nfor a in \"$@\"; do\n  if [ \"$prev\" = \"-p\" ] || [ \"$prev\" = \"--property\" ]; then\n    case \"$a\" in *=*) : ;; *) echo \"property '$a' missing =value\"; exit 2 ;; esac\n  fi\n  prev=\"$a\"\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use the exact 'key=value' form for -p.","Use 'key=' (empty value) when you need an empty-string property; the self-test confirms it's allowed.","Quote the whole 'key=value' if the value has spaces."],"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"}