I have installed a fresh 32bit Raspberry Pi OS on my Raspi4 and the dotnet script is installing the wrong version. Inside the script, the command uname is used to determine the correct version:
$ uname -m
aarch64
but on the same device:
$ getconf LONG_BIT
32
Someone else has seen this?
uname
reports about the kernel, not the OS userland. A 32-bit userland can be run by a 64-bit kernel and that's the norm for RpiOS.