{"record":{"id":"efff43bec7316715","repo":"abpframework/abp","slug":"use-command-abp-new-acme-bookstore-v-version","errorCode":null,"errorMessage":"Use command: abp new Acme.BookStore -v version","messagePattern":"Use command: abp new Acme\\.BookStore -v version","errorType":"exception","errorClass":"CliUsageException","httpStatus":null,"severity":"error","filePath":"framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs","lineNumber":88,"sourceCode":"        var userSpecifiedVersion = version != null;\n        var latestVersion = version ?? await GetLatestSourceCodeVersionAsync(name, type, null, includePreReleases);\n        if (version == null)\n        {\n            if (latestVersion == null)\n            {\n                Logger.LogWarning(\"The remote service is currently unavailable, please specify the version.\");\n                Logger.LogWarning(string.Empty);\n                Logger.LogWarning(\"Find the following template in your cache directory: \");\n                Logger.LogWarning(\"\\tTemplate Name\\tVersion\");\n\n                var templateList = GetLocalTemplates();\n                foreach (var cacheFile in templateList)\n                {\n                    Logger.LogWarning($\"\\t{cacheFile.TemplateName}\\t\\t{cacheFile.Version}\");\n                }\n\n                Logger.LogWarning(string.Empty);\n                throw new CliUsageException(\"Use command: abp new Acme.BookStore -v version\");\n            }\n\n            version = latestVersion;\n        }\n\n        if (type == SourceCodeTypes.Template)\n        {\n            var currentCliVersion = await CliVersionService.GetCurrentCliVersionAsync();\n            var templateVersion = SemanticVersion.Parse(version);\n\n            var outputWarning = false;\n            if (!trustUserVersion)\n            {\n                if (currentCliVersion.Major != templateVersion.Major || currentCliVersion.Minor != templateVersion.Minor)\n                {\n                    // major and minor version are different\n                    outputWarning = true;\n                }","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/abpframework/abp/blob/7ed43b1931b9df46a50c0c59148a18645641d0df/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/AbpIoSourceCodeStore.cs#L70-L106","documentation":"Thrown by `AbpIoSourceCodeStore.GetAsync` when no version was specified by the user AND the remote service returned no latest version (i.e. `GetLatestSourceCodeVersionAsync` returned null, typically because the remote is unreachable). The CLI first lists locally cached templates as a hint, then throws a `CliUsageException` instructing the user to pass an explicit version.","triggerScenarios":"Running `abp new <ProjectName>` without `-v` while the abp.io version API is unavailable (offline, blocked, or erroring), so the CLI cannot determine the latest template version.","commonSituations":"No/intermittent internet connection; behind a corporate proxy that blocks `www.abp.io`; abp.io outage; running `abp new` in an air-gapped environment.","solutions":["Re-run with an explicit version from the cached list printed just above the error: `abp new Acme.BookStore -v <version>`.","Restore connectivity to `www.abp.io` / `account.abp.io` and retry without `-v`.","Configure the CLI proxy if behind a corporate firewall (`abp config` / `appsettings.json`)."],"exampleFix":"# before\nabp new Acme.BookStore\n# after (offline / remote unavailable)\nabp new Acme.BookStore -v 8.3.0","handlingStrategy":"fallback","validationCode":"// Pass an explicit version so the CLI never depends on the remote latest lookup.\nstring version = await ResolveVersionFromCacheOrConfigAsync()\n    ?? throw new InvalidOperationException(\"Cannot determine version offline; pass -v explicitly.\");\nawait cli.RunAsync(new[] { \"new\", projectName, \"-v\", version });","typeGuard":null,"tryCatchPattern":"try { await cli.RunAsync(new[] { \"new\", projectName }); }\ncatch (CliUsageException ex) when (ex.Message.Contains(\"abp new Acme.BookStore -v\"))\n{\n    // parse the cached template versions from logs and retry with -v\n}","preventionTips":["Pin template versions in CI scripts with `-v`.","Maintain connectivity to abp.io for latest-version resolution.","Keep a local cache of known-good versions for offline use."],"tags":["cli","templates","new-project","network","versioning","abp-io"],"backgroundTag":null,"analyzedSha":"7ed43b1931b9df46a50c0c59148a18645641d0df","analyzedAt":"2026-08-13T16:26:11.351Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}