abpframework/abp · error · UserFriendlyException
Solution name is not valid. Project name should be 1 charact
Error message
Solution name is not valid. Project name should be 1 character length at minimum.
What it means
Thrown by `SolutionName.Parse(fullName)` when the name contains a `.` but the project segment (the part after the last dot) is empty. It is a `UserFriendlyException`. Example: `Acme.` yields an empty project.
Source
Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/SolutionName.cs:50
}
string companyName = null;
var projectName = fullName;
if (fullName.Contains("."))
{
var lastDotIndex = fullName.LastIndexOf(".", StringComparison.OrdinalIgnoreCase);
companyName = fullName.Substring(0, lastDotIndex);
projectName = fullName.Substring(lastDotIndex + 1);
if (companyName.Length < 1)
{
throw new UserFriendlyException("Solution name is not valid. Company name should be 1 character length at minimum.");
}
if (projectName.Length < 1)
{
throw new UserFriendlyException("Solution name is not valid. Project name should be 1 character length at minimum.");
}
}
return new SolutionName(fullName, companyName, projectName);
}
}
View on GitHub (pinned to 7ed43b1931)
Solutions
- Provide a project name after the dot, e.g. `Acme.BookStore`.
- If you want a single-name solution, omit the dot entirely (e.g. `Acme`).
- Validate the parsed project segment is non-empty before continuing.
Example fix
# before abp new Acme. # after abp new Acme.BookStore
Defensive patterns
Strategy: validation
Validate before calling
if (fullName.Contains("."))
{
var project = fullName.Substring(fullName.LastIndexOf('.') + 1);
if (string.IsNullOrWhiteSpace(project))
throw new ArgumentException("Project name (after the dot) must be non-empty.");
} Type guard
static bool HasValidProjectSegment(string fullName) =>
!fullName.Contains(".") || !string.IsNullOrWhiteSpace(fullName.Substring(fullName.LastIndexOf('.') + 1)); Try / catch
try { return SolutionName.Parse(fullName); }
catch (UserFriendlyException ex) when (ex.Message.Contains("Project name should be 1 character"))
{
throw new ArgumentException("Provide a project name after the dot (e.g. Acme.BookStore).", nameof(fullName), ex);
} Prevention
- Avoid trailing dots in solution names.
- Validate both segments after splitting.
- Use single-name solutions when no company is needed.
When it happens
Trigger: Passing a solution name ending with a dot such as `Acme.`, or a name whose trailing segment after the last dot is empty.
Common situations: Trailing dot typo; programmatically building a name with an empty project; accidental whitespace/dot.
Related errors
- Solution name is not valid. It should be 1 character length
- Solution name is not valid. Company name should be 1 charact
- repositoryNameWithOrganization '{repositoryNameWithOrganizat
- Can not set {companyName} if {companyNamePlaceHolder} is nul
- DbMigrations folder path is missing!
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/974a03735edd8e77.
Report an issue: GitHub.