{"record":{"id":"f6382c3231c5e949","repo":"abpframework/abp","slug":"there-is-no-template-found-with-given-name-name","errorCode":null,"errorMessage":"There is no template found with given name: {name}","messagePattern":"There is no template found with given name: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateInfoProvider.cs","lineNumber":77,"sourceCode":"                return new AppNoLayersProTemplate();\n            case AppProTemplate.TemplateName:\n                return new AppProTemplate();\n            case MicroserviceProTemplate.TemplateName:\n                return new MicroserviceProTemplate();\n            case MicroserviceServiceProTemplate.TemplateName:\n                return new MicroserviceServiceProTemplate();\n            case ModuleTemplate.TemplateName:\n                return new ModuleTemplate();\n            case ModuleProTemplate.TemplateName:\n                return new ModuleProTemplate();\n            case ConsoleTemplate.TemplateName:\n                return new ConsoleTemplate();\n            case WpfTemplate.TemplateName:\n                return new WpfTemplate();\n            case MauiTemplate.TemplateName:\n                return new MauiTemplate();\n            default:\n                throw new Exception(\"There is no template found with given name: \" + name);\n        }\n    }\n\n\n    private async Task<bool> CheckProLicenseAsync()\n    {\n        if (!AuthService.IsLoggedIn())\n        {\n            return false;\n        }\n\n        try\n        {\n            var url = $\"{CliUrls.AccountAbpIo}api/license/check-user\";\n            var client = _cliHttpClientFactory.CreateClient();\n\n            using (var response = await client.GetHttpResponseMessageWithRetryAsync(url, CancellationTokenProvider.Token, Logger))\n            {","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateInfoProvider.cs#L59-L95","documentation":"Thrown by TemplateInfoProvider when the template-name argument does not match any case in the switch over known TemplateName constants (App, AppPro, Module, ModulePro, MicroserviceServicePro, Console, Wpf, Maui, etc.). The CLI receives the template name from the --template option of 'abp new' and falls through to the default branch, treating the unknown string as a hard error rather than as unknown input.","triggerScenarios":"Running 'abp new MyProj -t <name>' (or ProjectBuilding API with args.TemplateName) where <name> is misspelled, truncated, or is a template only produced by ABP Studio's modern builder (e.g. 'react', 'maui-blazor'). Any value not equal to a registered *.TemplateName constant hits the default.","commonSituations":"Typo in template name (e.g. 'ap' instead of 'app'); using an old tutorial that references a renamed template; passing a Pro-only name without a license so it was never registered; shell quoting that strips part of the name.","solutions":["Run 'abp new MyProj -t app' (or module, console, wpf, maui, app-pro, module-pro) using the exact registered TemplateName constant.","Run 'abp new MyProj -h' or consult the CLI help to list supported template names for your installed version.","If you need the React UI or another modern-only template, use ABP Studio instead of the classic 'abp new' command.","Upgrade the ABP CLI ('abp update' or 'dotnet tool update -g Volo.Abp.Cli') so newly added template names are recognized."],"exampleFix":"// before\nabp new Acme.Shop -t aplication\n// after\nabp new Acme.Shop -t app","handlingStrategy":"validation","validationCode":"// Before calling GetTemplateInfoAsync, validate against the known names.\nvar allowed = new[] { \"app\", \"app-pro\", \"module\", \"module-pro\", \"console\", \"wpf\", \"maui\", \"microservice-service-pro\" };\nif (!allowed.Contains(args.TemplateName, StringComparer.OrdinalIgnoreCase))\n{\n    Console.Error.WriteLine($\"Unsupported template '{args.TemplateName}'. Choose one of: {string.Join(\", \", allowed)}\");\n    return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Maintain an allow-list of supported template names and surface it in your CLI wrapper.","Add integration tests that exercise every supported template name to detect regressions when names are renamed.","Document the Studio-only templates separately so users do not pass them to the classic CLI."],"tags":["cli","template-building","user-input","argument-validation"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}