Fix Install-DotNetSdk.ps1 hang from recursive Directory.Build.props search#513
Open
drognanar wants to merge 2 commits into
Open
Fix Install-DotNetSdk.ps1 hang from recursive Directory.Build.props search#513drognanar wants to merge 2 commits into
drognanar wants to merge 2 commits into
Conversation
…earch The Get-ChildItem call applied -Recurse to all three path arguments, including Directory.Build.props. PowerShell splits this into container + leaf filter, so -Recurse causes it to search the entire repo root for every file named Directory.Build.props, crawling into large directories (bin, obj, tmp, etc.) and causing the script to hang. Split the call so -Recurse only applies to the src/ and test/ project file globs. Directory.Build.props is fetched with Get-Item -LiteralPath (single file, no recursion, no wildcard interpretation). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
AArnott
requested changes
Apr 30, 2026
Address review feedback: keep recursive Directory.Build.props discovery under src/ and test/, while still picking up the repo-root file. Avoids crawling top-level bin/obj/tmp directories. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
348a724 to
8d14c85
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Get-ChildItemcall applied-Recurseto all three path arguments, includingDirectory.Build.props. PowerShell splits this into container + leaf filter, so-Recursecauses it to search the entire repo root for every file namedDirectory.Build.props, crawling into large directories (bin,obj,tmp, etc.) and causing the script to hang in repos with deep directory trees.Fix: Split the call so
-Recurseonly applies to thesrc/andtest/project file globs.Directory.Build.propsis fetched withGet-Item -LiteralPath(single file, no recursion, no wildcard interpretation).