Core
Detect installed sdk
dotnet --list-sdks
Detect installed runtimes
dotnet --list-runtime
Switch core sdk in csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
</Project>
Control version of net core used in a commandline, i.e. dotnet
- global.json
- searchable from current folder and above
{
"sdk": {
"version": "2.1.103"
}
}
You can easily create a global.json file in the current working folder with the dotnet new globaljson
command.
This will create a global.json file and pre-populate it with the latest version of the SDK available.
You can specify version that gets written --sdk-version argument
dotnet new globaljson --sdk-version 2.0.2
Seems no widely used helpers like nvm, only initial approaches https://github.com/faniereynders/dotnet-sdk-helpers