{"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":"error","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/60108ba66eb7d1d12f595480091b4ad80a24b172/src/coreclr/hosts/corerun/corerun.cpp#L786-L822","documentation":"Printed at src/coreclr/hosts/corerun/corerun.cpp:804 when a -p/--property argument is present but does not contain an '=' delimiter, so no value can be split from the key. corerun requires the `<key>=<value>` form.","triggerScenarios":"Triggered when the token after -p has no '=' (prop.find('=') returns npos). E.g. `corerun -p System.GC.Server true MyApp.dll`.","commonSituations":"Using a space instead of '=', forgetting the equals sign, or shell-quoting that strips the '='.","solutions":["Write the property as KEY=VALUE with no spaces around '='.","Quote the whole token if the value contains spaces: `-p \"FancyProp=/usr/first last/root\"`.","Double-check shell quoting/escaping that might split the token."],"exampleFix":"// before\ncorerun -p System.GC.Server true MyApp.dll\n// after\ncorerun -p System.GC.Server=true MyApp.dll","handlingStrategy":"validation","validationCode":"// Verify each property token contains '='\nbool property_form_ok(int argc, char** argv) {\n    for (int i=1;i<argc;i++) {\n        if (!strcmp(argv[i],\"-p\") || !strcmp(argv[i],\"--property\")) {\n            if (i+1>=argc) return false;\n            if (!strchr(argv[i+1],'=')) return false;\n        }\n    }\n    return true;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Write properties as KEY=VALUE with no surrounding spaces.","Quote tokens whose value contains spaces.","Shell-escape tokens to avoid splitting on '='."],"tags":["coreclr","corerun","cli","argument-parsing","properties"],"backgroundTag":null,"analyzedSha":"60108ba66eb7d1d12f595480091b4ad80a24b172","analyzedAt":"2026-08-10T18:54:11.478Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}