---
# System prepended metadata

title: Untitled

---



### Targeting a specific version to run

The .NET Core SDK version number is broken down into 4 sections:

![](https://i.imgur.com/YagDLi5.png)


Check all .NET SDKs installed
```powershell
dotnet --list-sdks
```

Result:
```powershell
2.1.504 [C:\Program Files\dotnet\sdk]
2.2.100 [C:\Program Files\dotnet\sdk]
5.0.102 [C:\Program Files\dotnet\sdk]
5.0.404 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]
6.0.101 [C:\Program Files\dotnet\sdk]
7.0.101 [C:\Program Files\dotnet\sdk]
```

Check the current version:
```
dotnet --version
```
Result:
`7.0.101`


Setting a specific version:
```powershell
dotnet new globaljson --sdk-version 6.0.100
```
Result:
```
The template "global.json file" was created successfully.
```
View the new global.json file content:
```powershell
cat .\global.json
```
Result:
```json
{
  "sdk": {
    "version": "6.0.100"
  }
}
```
Now check the version again:
```
dotnet --version
```
Result:
`6.0.100`

### Targeting the latest version from a major and minor

The command below will set the highest installed SDK version with the same **major**, **minor**, and **feature** value. If no such version exists, uses the next installed SDK version with the same **major** and **minor** value, otherwise fails.

```powershell
dotnet new globaljson --sdk-version 6.0.0 --roll-forward feature
```

Now check the version again:
```
dotnet --version
```
Result:
`6.0.101`