microsoft/aspire · error · EmptyChoicesException
No integration packages were found. Please check your…
Error message
No integration packages were found. Please check your internet connection or NuGet source configuration.
What it means
AddCommand throws EmptyChoicesException with this message when the integration package search over the configured NuGet channels returns zero packages. It is the CLI's way of aborting the interactive picker when there is nothing to list.
Solutions
- Check internet connectivity and any proxy settings
- Verify NuGet source configuration (NuGet.config) includes a feed carrying Aspire integration packages
- Inspect/reset the CLI channel configuration (aspire config) so valid channels are searched
- Retry after the feed outage; if using a local hive (ASPIRE_CLI_PACKAGES), ensure it is populated
Defensive patterns
Strategy: retry
Validate before calling
// connectivity probe
using var hc = new HttpClient();
await hc.GetAsync("https://api.nuget.org/v3/index.json"); Try / catch
try { /* aspire add ... */ }
catch (EmptyChoicesException ex) when (ex.Message.Contains("No integration packages"))
{
// check network/NuGet sources, then retry
} Prevention
- Verify NuGet.config sources include a feed with Aspire packages
- Check proxy/firewall settings for build/CI environments
- Keep the aspire CLI channel configuration valid
When it happens
Trigger: Running 'aspire add' when NuGet source queries return no integration packages: no network access, misconfigured NuGet sources, all channels filtered out, or an empty/incorrect package feed.
Common situations: Working offline or behind a corporate proxy blocking nuget.org; NuGet.config pointing only at private feeds lacking Aspire packages; a broken CLI channel configuration.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No template versions were found. Please check your internet…
- The requested version
- aspire-managed not found in layout.
- Bundle layout not found. Cannot perform NuGet restore in…
- Bundle layout not found. Cannot perform NuGet search in…
AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16).
Data as JSON: /api/errors/21d5936f2feddb2d.
Report an issue: GitHub.
Appendix: source
Thrown at src/Aspire.Cli/Commands/AddCommand.cs:203
packagesWithChannels = discoveredPackages as List<(NuGetPackage Package, PackageChannel Channel)> ?? discoveredPackages.ToList();
polyglotCompatibleIds = discoveredPolyglotIds;
}
else
{
var discoveredPackages = await InteractionService.ShowStatusAsync(
AddCommandStrings.SearchingForAspirePackages,
async () => await _integrationPackageSearchService.GetIntegrationPackagesWithChannelsAsync(effectiveAppHostProjectFile.Directory!, configuredChannel, cancellationToken));
packagesWithChannels = discoveredPackages as List<(NuGetPackage Package, PackageChannel Channel)> ?? discoveredPackages.ToList();
}
var packageCount = packagesWithChannels.Count;
searchPackagesActivity.SetAddPackageSearchResultCount(packageCount);
addActivity.SetAddPackageSearchResultCount(packageCount);
}
if (packagesWithChannels.Count == 0)
{
throw new EmptyChoicesException(AddCommandStrings.NoIntegrationPackagesFound);
}
var packagesWithShortName = packagesWithChannels.Select(IntegrationPackageSearchService.GenerateFriendlyName).OrderBy(p => p.FriendlyName, new CommunityToolkitFirstComparer()).ToList();
if (packagesWithShortName.Count == 0)
{
return AddCommandFailure(CliExitCodes.FailedToAddPackage, AddCommandStrings.NoPackagesFound);
}
if (applyPolyglotFilter)
{
bool MatchesIntegrationName((string FriendlyName, NuGetPackage Package, PackageChannel Channel) p)
=> p.FriendlyName == integrationName || p.Package.Id == integrationName;
// If the user named a specific integration that exists but is not polyglot-compatible, give a
// precise, actionable error rather than silently dropping it and fuzzy-matching something else.
if (integrationName is not null
&& packagesWithShortName.Any(p => MatchesIntegrationName(p) && !polyglotCompatibleIds.Contains(p.Package.Id))View on GitHub (pinned to 25830f84bd)