dotnet / dotnet/command-line-api

dotnet-suggest doesn't work for Microsoft Store Apps

Open
#2,074 5 comments 0 reactions 0 assignees View on GitHub
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

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.