.NET Core distributions come in two variants. The Runtime and the SDK. dotnet
figures out whether you want to use the Runtime or the SDK and dispatches your command to the right place.
The error you see is because --version
is an SDK command [1]. dotnet
tries to redirect it to the SDK, sees there is not SDK around, and suggests you install it.
If you have a dotnet
command that seems to do something, chances are you installed it correctly already!
If you just want to see that dotnet
works, try dotnet --info
, instead:
$ dotnet --info
Microsoft .NET Core Shared Framework Host
Version : 2.0.0
Build : N/A
For Raspberry Pi devices, only the Runtime is available. The SDK, even if available, would probably be too slow and a bit too resources intensive to provide a good experience. So the suggestion is to use the SDK on another computer (say, Linux on Intel x86_64) to target the raspberry pi runtime (dotnet publish -r linux-arm -c Release
) and then copy and run it on Raspberry Pi (dotnet /path/to/published.dll
).
[1] I think it is completely silly and wrong. But such is life.