{"record":{"id":"3b8d575fc0ff0c17","repo":"abpframework/abp","slug":"project-name-cannot-contain-the-word-illegalkeyw","errorCode":null,"errorMessage":"Project name cannot contain the word \"{illegalKeyword}\". Specify a different name.","messagePattern":"Project name cannot contain the word \"(.+?)\"\\. Specify a different name\\.","errorType":"exception","errorClass":"CliUsageException","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs","lineNumber":58,"sourceCode":"\r\n    private static void ValidateIllegalProjectName(string projectName)\r\n    {\r\n        foreach (var illegalProjectName in IllegalProjectNames)\r\n        {\r\n            if (projectName.Equals(illegalProjectName, StringComparison.OrdinalIgnoreCase))\r\n            {\r\n                throw new CliUsageException(\"Project name cannot be \\\"\" + illegalProjectName + \"\\\"! Specify a different name.\");\r\n            }\r\n        }\r\n    }\r\n\r\n    private static void ValidateIllegalKeywords(string projectName)\r\n    {\r\n        foreach (var illegalKeyword in IllegalKeywords)\r\n        {\r\n            if (projectName.Split(\".\").Contains(illegalKeyword))\r\n            {\r\n                throw new CliUsageException(\"Project name cannot contain the word \\\"\" + illegalKeyword + \"\\\". Specify a different name.\");\r\n            }\r\n        }\r\n    }\r\n\r\n    public static void Validate(string projectName)\r\n    {\r\n        ValidateSurrogateOrControlChar(projectName);\r\n        ValidateParentDirectoryString(projectName);\r\n        ValidateIllegalProjectName(projectName);\r\n        ValidateIllegalKeywords(projectName);\r\n    }\r\n}\r\n","sourceCodeStart":40,"sourceCodeEnd":71,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Utils/ProjectNameValidator.cs#L40-L71","documentation":"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.","triggerScenarios":"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).","commonSituations":"Using \"Blazor\" as a namespace segment; creating a Blazor-flavored solution and naming a segment Blazor; mis-typing a brand segment.","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."],"exampleFix":"// before\nabp new Acme.Blazor\n\n// after\nabp new Acme.Web  // and select the Blazor UI via template option, not the name","handlingStrategy":"validation","validationCode":"static readonly HashSet<string> BadKeywords = new() { \"MauiBlazor\", \"Blazor\" };\nstatic void EnsureNoBadSegment(string name)\n{\n    foreach (var seg in name.Split('.'))\n        if (BadKeywords.Contains(seg)) throw new ArgumentException($\"Segment '{seg}' is disallowed\");\n    Volo.Abp.Cli.Utils.ProjectNameValidator.Validate(name);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["abp-cli","project-name","validation","blazor"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}