Skip to content

Commit 45e07ea

Browse files
Clarify global.json version support (dotnet#49941)
* Clarify global.json version support and update SDK availability notes * update wording * Update docs/core/tools/global-json.md Co-authored-by: Copilot <[email protected]> * Clarify global.json version support --------- Co-authored-by: Copilot <[email protected]>
1 parent 89366b3 commit 45e07ea

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

docs/core/tools/global-json.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ The version of the .NET SDK to use.
4343

4444
This field:
4545

46-
- Doesn't have wildcard support; that is, you must specify the full version number.
46+
- Requires the full version number, such as 9.0.100.
47+
- Doesn't support version numbers like 9, 9.0, or 9.0.x.
48+
- Doesn't have wildcard support.
4749
- Doesn't support version ranges.
4850

4951
#### `allowPrerelease`
@@ -90,7 +92,7 @@ The following table shows the possible values for the `rollForward` key:
9092
#### `paths`
9193

9294
- Type: Array of `string`
93-
- Available since: .NET 10 Preview 3 SDK.
95+
- Available since: .NET 10 SDK.
9496

9597
Specifies the locations that should be considered when searching for a compatible .NET SDK. Paths can be absolute or relative to the location of the *global.json* file. The special value `$host$` represents the location corresponding to the running `dotnet` executable.
9698

@@ -103,7 +105,7 @@ This feature enables using local SDK installations (such as SDKs relative to a r
103105
#### `errorMessage`
104106

105107
- Type: `string`
106-
- Available since: .NET 10 Preview 3 SDK.
108+
- Available since: .NET 10 SDK.
107109

108110
Specifies a custom error message displayed when the SDK resolver can't find a compatible .NET SDK.
109111

@@ -209,6 +211,17 @@ The following example shows how to specify additional SDK search paths and a cus
209211
}
210212
```
211213

214+
The following example shows an invalid version specified. The output of the command `dotnet --info` shows the error message: "Version '10.0' is not valid for the 'sdk/version' value."
215+
216+
```json
217+
{
218+
"sdk": {
219+
"version": "10.0",
220+
"rollForward": "latestFeature"
221+
}
222+
}
223+
```
224+
212225
The following example shows how to specify `Microsoft.Testing.Platform` as the test runner:
213226

214227
```json

0 commit comments

Comments
 (0)