abpframework/abp · error · Exception
Package is not found or downloadable!
Error message
Package is not found or downloadable!
What it means
Thrown by `NugetPackageInfoProvider.GetAsync` when the package list fetched from abp.io's nugetPackages endpoint does not contain a NuGet package with the requested name. It is a raw `Exception`.
Source
Thrown at framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/NugetPackageInfoProvider.cs:41
ICancellationTokenProvider cancellationTokenProvider,
IRemoteServiceExceptionHandler remoteServiceExceptionHandler,
CliHttpClientFactory cliHttpClientFactory)
{
JsonSerializer = jsonSerializer;
CancellationTokenProvider = cancellationTokenProvider;
RemoteServiceExceptionHandler = remoteServiceExceptionHandler;
_cliHttpClientFactory = cliHttpClientFactory;
}
public async Task<NugetPackageInfo> GetAsync(string name)
{
var packageList = await GetPackageListInternalAsync();
var package = packageList.FirstOrDefault(m => m.Name == name);
if (package == null)
{
throw new Exception("Package is not found or downloadable!");
}
return package;
}
private async Task<List<NugetPackageInfo>> GetPackageListInternalAsync()
{
var client = _cliHttpClientFactory.CreateClient();
using (var responseMessage = await client.GetAsync(
$"{CliUrls.WwwAbpIo}api/download/nugetPackages/",
CancellationTokenProvider.Token
))
{
await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage);
var result = await responseMessage.Content.ReadAsStringAsync();
return JsonSerializer.Deserialize<List<NugetPackageInfo>>(result);
}View on GitHub (pinned to 7ed43b1931)
Solutions
- Verify the exact NuGet package name on abp.io/NuGet and retry.
- Check spelling and casing of the requested package name.
- Confirm network connectivity so the full package list is returned; retry on transient failures.
Defensive patterns
Strategy: validation
Validate before calling
var packages = await nugetProvider.GetPackageListInternalAsync();
if (!packages.Any(p => string.Equals(p.Name, name, StringComparison.OrdinalIgnoreCase)))
throw new ArgumentException($"NuGet package '{name}' not found."); Type guard
static async Task<bool> NugetPackageExistsAsync(NugetPackageInfoProvider provider, string name)
{
var list = await provider.GetPackageListAsync();
return list.Any(p => string.Equals(p.Name, name, StringComparison.OrdinalIgnoreCase));
} Try / catch
try { await nugetProvider.GetAsync(name); }
catch (Exception ex) when (ex.Message.Contains("Package is not found"))
{
logger.LogError("NuGet package '{Name}' not found or not downloadable.", name);
throw;
} Prevention
- Verify the NuGet package name on abp.io before requesting it.
- Confirm network connectivity for the full package list.
- Check entitlement for commercial packages.
When it happens
Trigger: Requesting NuGet package info via the CLI with a package name not present in the remote NuGet package list.
Common situations: Typo in the NuGet package name; package renamed/deprecated; commercial package requested without entitlement; partial list due to network issues.
Related errors
- Package is not found or downloadable!
- Module not found!
- '{packageName}' nuget package could not be found!
- ERROR: Remote server returns '{response.StatusCode}'
- Use command: abp new Acme.BookStore -v version
AI-assisted analysis of abpframework/abp@7ed43b1931 (2026-08-13).
Data as JSON: /api/errors/5e482704df7a1be1.
Report an issue: GitHub.