{"record":{"id":"8e13026ed5c78138","repo":"StockSharp/StockSharp","slug":"solution-not-found-solution","errorCode":null,"errorMessage":"solution not found: {solution}","messagePattern":"solution not found: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"scripts/check-solution-connectors.py","lineNumber":37,"sourceCode":"    if not connectors_root.is_dir():\n        raise ValueError(f\"connector repository not found: {connectors_root}\")\n\n    projects: list[str] = []\n    solution_root = f\"../{connectors_root.name}\"\n\n    for directory in connectors_root.iterdir():\n        if not directory.is_dir() or directory.name == \"Tests\":\n            continue\n\n        for project in directory.glob(\"*.csproj\"):\n            projects.append(f\"{solution_root}/{directory.name}/{project.name}\")\n\n    return sorted(projects, key=str.casefold)\n\n\ndef read_solution_connector_projects(solution: Path, connectors_root: Path) -> list[str]:\n    if not solution.is_file():\n        raise ValueError(f\"solution not found: {solution}\")\n\n    try:\n        root = ET.parse(solution).getroot()\n    except ET.ParseError as error:\n        raise ValueError(f\"invalid solution XML: {solution}: {error}\") from error\n\n    prefix = f\"../{connectors_root.name}/\"\n    projects: list[str] = []\n\n    for element in root.iter(\"Project\"):\n        path = normalize_solution_path(element.get(\"Path\", \"\"))\n        if path.startswith(prefix):\n            projects.append(path)\n\n    return projects\n\n\ndef main() -> int:","sourceCodeStart":19,"sourceCodeEnd":55,"githubUrl":"https://github.com/StockSharp/StockSharp/blob/601a191de678bff83da28b14828f8885214ca71c/scripts/check-solution-connectors.py#L19-L55","documentation":"read_solution_connector_projects validates that the solution file (default StockSharp.slnx) exists before parsing it. If the file path does not resolve to an actual file, it raises ValueError. The .slnx format is an XML-based solution format used by newer .NET tooling.","triggerScenarios":"Running check-solution-connectors.py with a --solution path that does not exist, or when the default StockSharp.slnx has been renamed, moved, or deleted.","commonSituations":"Running from a subdirectory where the relative path doesn't resolve; using --solution with a typo; the .slnx file was renamed in a solution-format refactor but the script default was not updated.","solutions":["Verify the solution file exists: run from the repository root where StockSharp.slnx lives.","Use --solution to pass the correct absolute or relative path.","If the file was renamed, update the script's default or pass the new name via --solution."],"exampleFix":"# before\npython scripts/check-solution-connectors.py --solution wrong-name.slnx\n# ERROR: solution not found: wrong-name.slnx\n\n# after\npython scripts/check-solution-connectors.py --solution StockSharp.slnx","handlingStrategy":"validation","validationCode":"solution_path = Path(\"StockSharp.slnx\").resolve()\nif not solution_path.is_file():\n    print(f\"Solution file not found: {solution_path}\")\n    sys.exit(1)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run the script from the repository root where StockSharp.slnx resides.","Verify the .slnx filename hasn't changed after solution-format migrations.","Use absolute paths with --solution in CI for reliability."],"tags":["python","ci","solution","filesystem"],"backgroundTag":null,"analyzedSha":"601a191de678bff83da28b14828f8885214ca71c","analyzedAt":"2026-08-13T20:43:24.460Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}