global.json
A JSON file at the root of a repository that tells the dotnet command which SDK version to use there.
In more detail
Its sdk.version pins a feature band, rollForward: latestPatch allows servicing fixes in that band, and allowPrerelease: false keeps preview SDKs out. If the SDK is missing, commands fail early with a clear message.
Example
{ "sdk": { "version": "10.0.100", "rollForward": "latestPatch" } }Related terms
- SDK — A software development kit: a bundle of tools, libraries and documentation for building software against a platform or service.
- roll forward — The rule by which .NET picks a newer installed version than the one requested, such as the newest 10.0.x runtime for an app built for 10.0.
- feature band — A group of .NET SDK versions that share the same hundreds digit in the last version number, such as 10.0.1xx, and so have the same features.
Taught in
- Directory.Build.props, global.json and Central Packages — Modern .NET Core, C# & Enterprise Microservices