abpframework/abp · error · CliUsageException
Invalid Suite command! Run "abp help suite" command to see a
Error message
Invalid Suite command! Run "abp help suite" command to see available Suite commands.
What it means
Thrown by the default case in SuiteCommand.ExecuteAsync's switch statement when the operationType (the first positional argument, normalized via NamespaceHelper.NormalizeNamespace) doesn't match any recognized subcommand. Valid subcommands are: empty string/null (launch Suite), 'generate', 'install', 'update', 'remove'. Any other value hits the default case.
Source
Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Commands/SuiteCommand.cs:112
}
break;
case "install":
await InstallSuiteAsync(version, preview);
break;
case "update":
await UpdateSuiteAsync(version, preview);
break;
case "remove":
Logger.LogInformation("Removing ABP Suite...");
RemoveSuite();
break;
default:
throw new CliUsageException("Invalid Suite command! Run \"abp help suite\" command to see available Suite commands.");
}
}
private async Task GenerateCrudPageAsync(CommandLineArgs args)
{
var entityFile = args.Options.GetOrNull(Options.Crud.Entity.Short, Options.Crud.Entity.Long);
var solutionFile = args.Options.GetOrNull(Options.Crud.Solution.Short, Options.Crud.Solution.Long);
if (entityFile.IsNullOrEmpty() || !entityFile.EndsWith(".json") || !File.Exists(entityFile) ||
solutionFile.IsNullOrEmpty() || !(solutionFile.EndsWith(".sln") || solutionFile.EndsWith(".slnx")))
{
throw new UserFriendlyException("Invalid Arguments!");
}
Logger.LogInformation("Generating CRUD Page...");
var client = _cliHttpClientFactory.CreateClient(false);
var solutionId = await GetSolutionIdAsync(client, solutionFile);View on GitHub (pinned to 7ed43b1931)
Solutions
- Run 'abp help suite' to see all available subcommands
- Use one of: (no argument), install, update, remove, or generate
- Check for typos in the subcommand name
Example fix
// before abp suite instal // after abp suite install
Defensive patterns
Strategy: validation
Validate before calling
// Validate subcommand before dispatching
var validSuiteCommands = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
{
"", "generate", "install", "update", "remove"
};
var operationType = NamespaceHelper.NormalizeNamespace(commandLineArgs.Target);
if (!validSuiteCommands.Contains(operationType ?? ""))
{
Console.Error.WriteLine($"Unknown command '{operationType}'. Valid: generate, install, update, remove");
return;
} Type guard
// Check if a string is a valid Suite subcommand
public static bool IsValidSuiteCommand(string command)
{
return new[] { "generate", "install", "update", "remove" }
.Contains(command, StringComparer.OrdinalIgnoreCase);
} Try / catch
try
{
await suiteCommand.ExecuteAsync(commandLineArgs);
}
catch (CliUsageException ex) when (ex.Message.Contains("Invalid Suite command"))
{
Console.Error.WriteLine("Run 'abp help suite' for available commands.");
} Prevention
- Always run 'abp help suite' when unsure of available subcommands
- Use tab-completion if your shell supports it
- Double-check subcommand spelling against the help output
When it happens
Trigger: Running 'abp suite <unknown>' where <unknown> is not a valid subcommand. For example 'abp suite deploy', 'abp suite start', 'abp suite run', 'abp suite open' all trigger this error.
Common situations: Typo in the subcommand name (e.g., 'instal' instead of 'install'), using a command from a different ABP version's documentation, guessing at available commands without checking help.
Related errors
- Option Type is required
- Option Type value is invalid
- Please login with your account.
- Local paths are not specified!
- Target culture is missing!
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/6efd110be0a82337.
Report an issue: GitHub.