$ sudo snap install dotnet-sdk --classic
dotnet-sdk 3.1.402 from Microsoft .NET Core (dotnetcore✓) installed
$ dotnet
Command 'dotnet' not found, but can be installed with:
sudo snap install dotnet-sdk
$ stat /snap/bin/dotnet
stat: cannot stat '/snap/bin/dotnet': No such file or directory
$ snap aliases | grep dotnet
<empty>
I do not see any snap warnings and the journal shows just snapd[3875]: api.go:997: Installing snap "dotnet-sdk" revision unset in the logs. Anything else to check?
Hm you could check “snap known” (I think snap known snap-declaration or somesuch) just to double-check your installation has the correct copy of the assertion with the alias declared. Other than that, it looks to be a snapd problem, not a store issue so I would perhaps recategorize this under https://forum.snapcraft.io/c/snapd and ask there.
Yes this seems to be a snapd issue, I can reproduce it and don’t see anything fishy in the snapd tasks log or debug log from snapd itself. I will try to have a look inside snapd, but please file a LP bug so we don’t lose track of this on the forum (and apologies for telling you to post on the forum and then on LP, I promise I won’t redirect you from there to somewhere else )