dotnet / dotnet/command-line-api
dotnet-suggest doesn't work for Microsoft Store Apps
- Dominant language
- C#
- Stars
- 3.7k
- Forks
- 428
- PR merge metrics
- No merged PRs in 30d
Description
The Microsoft Store Developer CLI (https://github.com/microsoft/msstore-cli) is built using System.CommandLine.
We've enabled suggestions, but the registration process is using this exe's path at the `.dotnet-suggest-registration.txt` file:
```C:\Program Files\WindowsApps\Microsoft.MicrosoftStoreCLI_0.1.20.0_x64__8wekyb3d8bbwe\msstore.exe```
which is the real exe file linked by the 0 byte file that acts as a "shortcut" to the actual executable. This "shortcut" lives here:
```C:\Users\{USER}\AppData\Local\Microsoft\WindowsApps\MSStore.exe```
Running:
```dotnet-suggest get -e "C:\Users\{USER}\AppData\Local\Microsoft\WindowsApps\MSStore.exe"```
returns nothing, but running:
```dotnet-suggest get -e "C:\Program Files\WindowsApps\Microsoft.MicrosoftStoreCLI_0.1.20.0_x64__8wekyb3d8bbwe\MSStore.exe"```
returns the actual suggestions.
The problem seems to be that the registration is using the real assembly (which is not wrong), but the Register-ArgumentCompleter script block is using `Get-Command`, which returns the 0 byte file, which is not registered.
Contributor guide
Assessment
This issue has not been assessed yet.