Update Install-Dotnet to directly run the install script - #28022
Merged
Dongbo Wang (daxian-dbw) merged 1 commit intoSep 17, 2026
Merged
Conversation
Dongbo Wang (daxian-dbw)
requested review from
a team and
Justin Chung (jshigetomi)
as code owners
September 17, 2026 05:18
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Copilot started reviewing on behalf of
Dongbo Wang (daxian-dbw)
September 17, 2026 05:18
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is localized and preserves the existing installation parameters while addressing the reported console behavior.
Pull request overview
Updates Windows .NET SDK installation to execute dotnet-install.ps1 in the current PowerShell process, avoiding unnecessary child-process console changes.
Changes:
- Simplifies Windows installer argument construction.
- Removes the Windows PowerShell subprocess invocation.
File summaries
| File | Description |
|---|---|
build.psm1 |
Directly invokes the downloaded .NET installation script. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Ilya (iSazonov)
approved these changes
Sep 17, 2026
Patrick Meinecke (SeeminglyScience)
approved these changes
Sep 17, 2026
Dongbo Wang (daxian-dbw)
merged commit Sep 17, 2026
46337f9
into
PowerShell:master
39 of 41 checks passed
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.
PR Summary
Fix #27978
The dotnet-install.ps1 now works fine with PowerShell 7+. AI found no Windows PowerShell 5.1-only dependencies or PowerShell 7 incompatibilities. Validation performed:
Get-CimInstance.HttpClient, proxy handling, andAdd-Typeusage.Invoke-WebRequest -UseBasicParsingremains accepted in PowerShell 7, although that switch is now effectively ignored.taris checked before use, with ZIP as the fallback.Get-PSDrivespace information can be unreliable on older PowerShell versions.This PR updates the related script in
build.psm1to rundotnet-install.ps1directly within the calling PowerShell.PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright header