{"record":{"id":"cffc14ebf980658c","repo":"abpframework/abp","slug":"specified-directory-does-not-exist-cffc14","errorCode":null,"errorMessage":"Specified directory does not exist.","messagePattern":"Specified directory does not exist\\.","errorType":"exception","errorClass":"CliUsageException","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs","lineNumber":652,"sourceCode":"            \"System.Double\" => \"double\",\n            \"Double\" => \"double\",\n            \"System.Object\" => \"object\",\n            \"Object\" => \"object\",\n            \"System.Byte\" => \"byte\",\n            \"Byte\" => \"byte\",\n            \"System.Char\" => \"char\",\n            \"Char\" => \"char\",\n            _ => typeName\n        };\n\n        return $\"{typeName}{nullable}\";\n    }\n\n    private static void CheckWorkDirectory(string directory)\n    {\n        if (!Directory.Exists(directory))\n        {\n            throw new CliUsageException(\"Specified directory does not exist.\");\n        }\n\n        var projectFiles = Directory.GetFiles(directory, \"*.csproj\");\n        if (!projectFiles.Any())\n        {\n            throw new CliUsageException(\"No project file(csproj) found in the directory.\");\n        }\n    }\n\n    private static void CheckFolder(string folder)\n    {\n        if (!folder.IsNullOrWhiteSpace() && Path.HasExtension(folder))\n        {\n            throw new CliUsageException(\"Option folder should be a directory.\");\n        }\n    }\n}\n","sourceCodeStart":634,"sourceCodeEnd":670,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/CSharp/CSharpServiceProxyGenerator.cs#L634-L670","documentation":"CSharpServiceProxyGenerator.CheckWorkDirectory throws a CliUsageException when Directory.Exists(directory) is false. The C# proxy generator needs a valid work directory containing the target Web/HTTP project to discover application services and emit generated files.","triggerScenarios":"Running 'abp generate-proxy -t csharp' with a --work-directory / -wd argument pointing to a path that does not exist on disk, or running from a directory that has been deleted or mis-typed.","commonSituations":"Typo in the work-directory path; relative path resolved against the wrong current directory; directory deleted in a clean/Rebuild; CI runner using a checkout path that does not exist.","solutions":["Verify the path exists: 'ls <work-directory>'.","Use an absolute path for --work-directory to avoid cwd-relative resolution issues.","cd into the project folder and re-run without --work-directory so the current directory is used."],"exampleFix":"// before\nabp generate-proxy -t csharp -wd ./Acme.App.HttpApi.Client\n// after\nabp generate-proxy -t csharp -wd /repo/src/Acme.App.HttpApi.Client","handlingStrategy":"validation","validationCode":"if (!Directory.Exists(workDirectory))\n{ Console.Error.WriteLine($\"Work directory '{workDirectory}' does not exist.\"); return; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use absolute paths for --work-directory.","Verify the path exists in a pre-step before invoking the CLI."],"tags":["cli","service-proxy","csharp","working-directory","path-resolution"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}