microsoft / microsoft/aspire

13.3: new app resolves Aspire packages from PR hive after aspire add docker

Open
#16,648 4 comments 0 reactions 1 assignee Claimed by @mitchdenny View on GitHub
area-cli bug
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

### Is there an existing issue for this?

- [x] I have searched the existing issues

### Describe the bug

Correction to the original report: `aspire add docker` does write the `PackageReference` to the AppHost project. In the local repro at `D:\GitHub\13.3\0`, the AppHost project contains:

```xml

```

The remaining issue appears to be package source / hive selection. The generated app's `nuget.config` maps all `Aspire*` packages to a local PR hive instead of a stable/13.3 feed:

```xml








```

So `aspire add docker` reports success and writes `Aspire.Hosting.Docker` version `13.3.0`, but the project is configured to resolve all Aspire packages from a PR hive (`pr-16618`). That seems wrong for a new 13.3 app unless the user explicitly asked the generated project to stay pinned to that PR hive.

### Expected Behavior

For a new app created from the 13.3 template, `aspire add docker` should add `Aspire.Hosting.Docker` and leave the project configured to resolve 13.3 Aspire packages from the expected 13.3/stable package source.

If the CLI is intentionally carrying forward a PR hive/channel into newly created apps, it should make that explicit because the package references look like stable 13.3 references while `nuget.config` forces `Aspire*` resolution through a PR hive.

### Steps To Reproduce

1. Install/use Aspire CLI 13.3 in an environment that previously installed a CLI from a PR hive/channel.
2. Create a new app from the template.
3. Select the React frontend and ASP.NET Core backend template options.
4. From the new app directory, run:

```text
aspire add docker
```

5. Observe that the CLI prints success:

```text
aspire add docker
Finding AppHosts...
0.AppHost\0.AppHost.csproj
The package Aspire.Hosting.Docker::13.3.0 was added successfully.
```

6. Inspect the generated `nuget.config`.

Actual result: the package reference exists, but `nuget.config` maps `Aspire*` packages to a PR hive such as `C:/Users//.aspire/hives/pr-16618/packages`.

### Exceptions (if any)

No exception is shown.

### Aspire doctor output

Not captured for this report.

### Anything else?

Local repro folder: `D:\GitHub\13.3\0`

This was originally reported as the package not being added, but the better description is that package source/hive selection looks wrong for the 13.3 new-template/add-package workflow.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.