Installing Aspire CLI - access denied with running instances
- 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
If you have an aspire app running somewhere on your machine, and you try to install the CLI:
```pwsh
iex "& { $(irm https://aspire.dev/install.ps1) } -Quality staging"
```
You'll get an error message about the `aspire.exe` denying access, but a contradicting message that it successfully installed (which is a false positive).
```pwsh
iex "& { $(irm https://aspire.dev/install.ps1) } -Quality staging"
Downloading from: https://aka.ms/dotnet/9/aspire/rc/daily/aspire-cli-win-x64.zip
Remove-Item: Access to the path 'C:\Users\dapine\.aspire\bin\aspire.exe' is denied.
Aspire CLI successfully installed to: C:\Users\dapine\.aspire\bin\aspire.exe
The aspire cli is now available for use in this and new sessions.
```
I verified the `aspire.exe` was in fact, not updated.
### Expected Behavior
It should offer to attempt to gracefully end all `aspire.exe` consuming processes (or something similar to that), so that it can replace the exe. Also, the messaging is inaccurate, if it fails - it shouldn't report success.
### Steps To Reproduce
Have the Aspire CLI installed. Create an app with it, and have it running...then attempt to install the CLI in a new terminal.
### Exceptions (if any)
_No response_
### .NET Version info
_No response_
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.