abpframework/abp · error · CliUsageException
Project name cannot contain the word "{illegalKeyword}". Spe
Error message
Project name cannot contain the word "{illegalKeyword}". Specify a different name. What it means
Thrown by ProjectNameValidator.ValidateIllegalKeywords when any dot-separated segment of the project name equals "MauiBlazor" or "Blazor". The CLI's project-name normalization conflicts with these reserved words, so they are disallowed as a segment to prevent generating an invalid solution structure.
Source
Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs:58
private static void ValidateIllegalProjectName(string projectName)
{
foreach (var illegalProjectName in IllegalProjectNames)
{
if (projectName.Equals(illegalProjectName, StringComparison.OrdinalIgnoreCase))
{
throw new CliUsageException("Project name cannot be \"" + illegalProjectName + "\"! Specify a different name.");
}
}
}
private static void ValidateIllegalKeywords(string projectName)
{
foreach (var illegalKeyword in IllegalKeywords)
{
if (projectName.Split(".").Contains(illegalKeyword))
{
throw new CliUsageException("Project name cannot contain the word \"" + illegalKeyword + "\". Specify a different name.");
}
}
}
public static void Validate(string projectName)
{
ValidateSurrogateOrControlChar(projectName);
ValidateParentDirectoryString(projectName);
ValidateIllegalProjectName(projectName);
ValidateIllegalKeywords(projectName);
}
}
View on GitHub (pinned to 7ed43b1931)
Solutions
- Rename the offending segment to something that is not the literal "Blazor" or "MauiBlazor" (e.g. "Blz", "Web", or your brand prefix).
- Keep the Blazor UI designation in the template/flavor flag rather than the project name.
- Run ProjectNameValidator.Validate() on the candidate name before invoking the CLI.
Example fix
// before abp new Acme.Blazor // after abp new Acme.Web // and select the Blazor UI via template option, not the name
Defensive patterns
Strategy: validation
Validate before calling
static readonly HashSet<string> BadKeywords = new() { "MauiBlazor", "Blazor" };
static void EnsureNoBadSegment(string name)
{
foreach (var seg in name.Split('.'))
if (BadKeywords.Contains(seg)) throw new ArgumentException($"Segment '{seg}' is disallowed");
Volo.Abp.Cli.Utils.ProjectNameValidator.Validate(name);
} Prevention
- Do not name a dot-segment Blazor or MauiBlazor; encode UI choice via template options.
- Validate names with ProjectNameValidator in wrapper scripts.
- Keep brand/product segments distinct from reserved ABP keywords.
When it happens
Trigger: Passing a dotted project name where one segment is exactly "Blazor" or "MauiBlazor", e.g. "Acme.Blazor" or "Foo.MAUIBLAZOR" (match is case-sensitive on the literal keyword, so exact case required — note Contains on the split array uses default equality).
Common situations: Using "Blazor" as a namespace segment; creating a Blazor-flavored solution and naming a segment Blazor; mis-typing a brand segment.
Related errors
- Project name cannot contain ".."! Specify a different name.
- Project name cannot contain surrogate or control characters!
- Project name cannot be "{illegalProjectName}"! Specify a dif
- DbMigrations folder path is missing!
- Module name is missing!
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/3b8d575fc0ff0c17.
Report an issue: GitHub.