{"record":{"id":"67f0b759a2d24a30","repo":"abpframework/abp","slug":"angular-json-file-not-found-you-must-run-this-com","errorCode":null,"errorMessage":"angular.json file not found. You must run this command in the angular folder.","messagePattern":"angular\\.json file not found\\. You must run this command in the angular folder\\.","errorType":"exception","errorClass":"CliUsageException","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs","lineNumber":139,"sourceCode":"        if (!parsed)\n        {\n            Logger.LogWarning(\"Couldn't determinate version of \\\"@abp/ng.schematics\\\" package.\");\n            return;\n        }\n\n        var cliVersion = await _cliVersionService.GetCurrentCliVersionAsync();\n        if (semanticSchematicsVersion < cliVersion)\n        {\n            Logger.LogWarning(\"\\\"@abp/ng.schematics\\\" version is lower than ABP Cli version.\");\n        }\n    }\n\n    private static void CheckAngularJsonFile()\n    {\n        var angularPath = $\"angular.json\";\n        if (!File.Exists(angularPath))\n        {\n            throw new CliUsageException(\n                \"angular.json file not found. You must run this command in the angular folder.\"\n            );\n        }\n    }\n}\n","sourceCodeStart":121,"sourceCodeEnd":145,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ServiceProxying/Angular/AngularServiceProxyGenerator.cs#L121-L145","documentation":"CheckAngularJsonFile looks for 'angular.json' in the current working directory and throws a CliUsageException if missing. angular.json is the Angular CLI workspace definition; the proxy generator relies on it to locate projects and source roots, so running outside the Angular workspace is fatal.","triggerScenarios":"Running Angular proxy generation from a directory that does not contain an Angular CLI workspace file (e.g. the .Net backend folder or repo root).","commonSituations":"Wrong working directory; the Angular app was created with a different toolchain and uses .angular-cli.json (legacy) or no workspace file; renamed/moved angular.json.","solutions":["cd into the folder containing angular.json (typically angular/) before running the command.","Confirm the file exists: 'ls angular.json'.","If your project uses the legacy .angular-cli.json, migrate to the modern angular.json workspace or upgrade the ABP Angular tooling."],"exampleFix":"// before (run from backend project)\nabp generate-proxy -t ng\n// after\ncd ../angular/\nabp generate-proxy -t ng","handlingStrategy":"validation","validationCode":"if (!File.Exists(\"angular.json\"))\n{ Console.Error.WriteLine(\"Run this command from the Angular workspace folder.\"); return; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run proxy generation from the Angular workspace root.","Verify angular.json presence in automation before invoking the CLI."],"tags":["cli","service-proxy","angular","working-directory","argument-validation"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}