{"record":{"id":"dfe5bb2a5d2872a4","repo":"abpframework/abp","slug":"no-project-file-found-in-the-directory-the-workin-dfe5bb","errorCode":null,"errorMessage":"No project file found in the directory. The working directory must have a Web project file.","messagePattern":"No project file found in the directory\\. The working directory must have a Web project file\\.","errorType":"exception","errorClass":"CliUsageException","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/JavaScript/JavaScriptServiceProxyGenerator.cs","lineNumber":85,"sourceCode":"        if (File.Exists(filePath))\n        {\n            File.Delete(filePath);\n        }\n\n        Logger.LogInformation($\"Delete {GetLoggerOutputPath(filePath, args.WorkDirectory)}\");\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(\n                \"No project file found in the directory. The working directory must have a Web project file.\");\n        }\n    }\n\n    private static string RemoveInitializedEventTrigger(string script)\n    {\n        return script.Replace(EventTriggerScript, string.Empty);\n    }\n}\n","sourceCodeStart":67,"sourceCodeEnd":95,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/JavaScript/JavaScriptServiceProxyGenerator.cs#L67-L95","documentation":"Second branch of the JS generator's CheckWorkDirectory: the directory exists but contains no .csproj. The JavaScript proxy generator still needs a Web project file in the work directory to read the application service metadata from the compiled backend, even though output is JS/TS.","triggerScenarios":"Pointing the JS proxy generator at a folder with no .csproj (e.g. the angular/ folder alone, a docs folder, or a solution root containing only .sln).","commonSituations":"Passing the front-end folder instead of the ASP.NET Core Web project folder; the Web .csproj lives one level deeper; project not created yet.","solutions":["Point --work-directory at the folder containing the Web .csproj (typically *.Web or *.Web.Host).","Confirm with 'ls <dir>/*.csproj'.","Create the Web project first if it does not exist."],"exampleFix":"// before\nabp generate-proxy -t js -wd ./angular   // no csproj\n// after\nabp generate-proxy -t js -wd ./src/Acme.App.Web","handlingStrategy":"validation","validationCode":"if (!Directory.GetFiles(workDirectory, \"*.csproj\").Any())\n{ Console.Error.WriteLine($\"No Web project (.csproj) in '{workDirectory}'.\"); return; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Point --work-directory at the ASP.NET Core Web project folder, not the front-end folder.","Confirm a .csproj is present before generating JS proxies."],"tags":["cli","service-proxy","javascript","project-resolution","argument-validation"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}