Skip to content

Commit ef33f6d

Browse files
CopilotmeaghanlewisCopilot
authored
docs: clarify global.json search logic for muxer vs MSBuild SDK resolver (#52097)
* Initial plan * Update global.json docs to clarify muxer vs MSBuild SDK resolver search logic Co-authored-by: meaghanlewis <10103121+meaghanlewis@users.noreply.github.com> * Update docs/core/tools/global-json.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: meaghanlewis <10103121+meaghanlewis@users.noreply.github.com> Co-authored-by: Meaghan Osagie (Lewis) <mosagie@microsoft.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8074661 commit ef33f6d

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

docs/core/tools/global-json.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: global.json overview
33
description: Learn how to use the global.json file to set the .NET SDK version when running .NET CLI commands.
44
ms.topic: how-to
5-
ms.date: 10/22/2025
5+
ms.date: 03/05/2026
66
ms.custom: "updateeachrelease"
77
ai-usage: ai-assisted
88
---
@@ -23,7 +23,10 @@ If you always want to use the latest SDK version that is installed on your machi
2323
}
2424
```
2525

26-
The .NET SDK looks for a *global.json* file in the current working directory (which isn't necessarily the same as the project directory) or one of its ancestor directories.
26+
You rely on two components in the .NET SDK to search for a *global.json* file. Each component starts from a different location and searches up through ancestor directories:
27+
28+
- **.NET SDK muxer** handles `dotnet` CLI commands. It starts from the current working directory, which isn't necessarily the same as the project directory.
29+
- **.NET MSBuild project SDK resolver** resolves project SDKs during builds. It starts from the directory that contains a solution file, if one exists. If no solution file exists, it starts from the directory that contains the current project file. If neither file exists, it uses the current working directory.
2730

2831
For information about specifying the runtime version instead of the SDK version, see [Target frameworks](../../standard/frameworks.md).
2932

0 commit comments

Comments
 (0)