How to Pin the .NET SDK Version with global.json in a .NET C# Project
By default, every dotnet command uses the newest .NET SDK on the computer. That's fine until a teammate or a build server has a different one, and the same project starts behaving differently. A global.json file at the root of your repository settles which SDK the project uses. This guide creates one with .NET 10, then tries every rollForward value against the real SDK installed on this computer, so you can see which ones pass and which fail before you choose.
