Functions fails to enable Aspire Orchestration unless AppHost SDK is in local cache
- 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):

[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
Assessment
This issue has not been assessed yet.