microsoft / microsoft/aspire

Functions fails to enable Aspire Orchestration unless AppHost SDK is in local cache

Open
#6,622 7 comments 2 reactions 1 assignee Claimed by @phenning View on GitHub
area-tooling vs
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

When creating a new Azure Functions project and using 'Enlist in Aspire Orchestration' -- it will fail if the AppHost SDK package has never been used before.

### Expected Behavior

Creating an Azure Function project with orchestration should work.

### Steps To Reproduce

Clear nuget cache (`dotnet nuget locals all -c`)
File...New Azure Function
Check "Enlist in orchestration" checkbox
Fail with (this shows preview 1, but could be rc1 depending on template versions installed):
![Image](https://github.com/user-attachments/assets/6be47a97-1f1b-4a78-a68a-5a371aa20849)

[Workaround]
Create an Aspire app with the apphost sdk on the machine -- this will force a restore and cache the package
the above flow should now work

### Exceptions (if any)

_No response_

### .NET Version info

_No response_

### Anything else?

_No response_

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.