check version of asp.net core

C#
dotnet --info
Source

Also in C#: