abpframework/abp · error · Exception

There is no template found with given name: {name}

Error message

There is no template found with given name: {name}

What it means

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.

Source

Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/TemplateInfoProvider.cs:77

                return new AppNoLayersProTemplate();
            case AppProTemplate.TemplateName:
                return new AppProTemplate();
            case MicroserviceProTemplate.TemplateName:
                return new MicroserviceProTemplate();
            case MicroserviceServiceProTemplate.TemplateName:
                return new MicroserviceServiceProTemplate();
            case ModuleTemplate.TemplateName:
                return new ModuleTemplate();
            case ModuleProTemplate.TemplateName:
                return new ModuleProTemplate();
            case ConsoleTemplate.TemplateName:
                return new ConsoleTemplate();
            case WpfTemplate.TemplateName:
                return new WpfTemplate();
            case MauiTemplate.TemplateName:
                return new MauiTemplate();
            default:
                throw new Exception("There is no template found with given name: " + name);
        }
    }


    private async Task<bool> CheckProLicenseAsync()
    {
        if (!AuthService.IsLoggedIn())
        {
            return false;
        }

        try
        {
            var url = $"{CliUrls.AccountAbpIo}api/license/check-user";
            var client = _cliHttpClientFactory.CreateClient();

            using (var response = await client.GetHttpResponseMessageWithRetryAsync(url, CancellationTokenProvider.Token, Logger))
            {

View on GitHub (pinned to 7ed43b1931)

Solutions

  1. Run 'abp new MyProj -t app' (or module, console, wpf, maui, app-pro, module-pro) using the exact registered TemplateName constant.
  2. Run 'abp new MyProj -h' or consult the CLI help to list supported template names for your installed version.
  3. If you need the React UI or another modern-only template, use ABP Studio instead of the classic 'abp new' command.
  4. Upgrade the ABP CLI ('abp update' or 'dotnet tool update -g Volo.Abp.Cli') so newly added template names are recognized.

Example fix

// before
abp new Acme.Shop -t aplication
// after
abp new Acme.Shop -t app
Defensive patterns

Strategy: validation

Validate before calling

// Before calling GetTemplateInfoAsync, validate against the known names.
var allowed = new[] { "app", "app-pro", "module", "module-pro", "console", "wpf", "maui", "microservice-service-pro" };
if (!allowed.Contains(args.TemplateName, StringComparer.OrdinalIgnoreCase))
{
    Console.Error.WriteLine($"Unsupported template '{args.TemplateName}'. Choose one of: {string.Join(", ", allowed)}");
    return;
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13). Data as JSON: /api/errors/f6382c3231c5e949. Report an issue: GitHub.