Skip to content

Trim docs using pwsh via dotnet tool to support cross-platform local development.#4121

Merged
cheenamalhotra merged 2 commits intomainfrom
dev/mdaigle/pwsh-via-dotnet-tool
Apr 1, 2026
Merged

Trim docs using pwsh via dotnet tool to support cross-platform local development.#4121
cheenamalhotra merged 2 commits intomainfrom
dev/mdaigle/pwsh-via-dotnet-tool

Conversation

@mdaigle
Copy link
Copy Markdown
Contributor

@mdaigle mdaigle commented Mar 31, 2026

Having to install powershell is a roadblock for local development on mac and linux. We can install it via dotnet tools before performing any build actions that depend on it.

@mdaigle mdaigle requested a review from a team as a code owner March 31, 2026 19:39
Copilot AI review requested due to automatic review settings March 31, 2026 19:39
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Mar 31, 2026
@paulmedynski paulmedynski added the Hotfix 7.0.1 When this PR merges, automatically open a PR to cherry-pick to the 7.0.1 branch label Mar 31, 2026
@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the XML doc “TrimDocs” build step to use a pwsh local dotnet tool (restored via dotnet tool restore) so developers on macOS/Linux don’t need to install PowerShell separately.

Changes:

  • Switch TrimDocs execution to dotnet tool run pwsh and add dotnet tool restore before running the script.
  • Add a RestoreTools target and wire it as a dependency for doc trimming in the consolidated ref project.
  • Register the powershell dotnet tool (command pwsh) in the repo’s tool manifest.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
tools/targets/TrimDocsForIntelliSense.targets Replaces OS-specific PowerShell invocations with local tool restore + dotnet tool run pwsh.
src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj Adds a tool-restore target and switches trimming to use the local pwsh tool.
dotnet-tools.json Adds powershell tool entry providing the pwsh command.

Comment thread tools/targets/TrimDocsForIntelliSense.targets
Comment thread tools/targets/TrimDocsForIntelliSense.targets
Comment thread src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj
Comment thread src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.csproj
@cheenamalhotra cheenamalhotra merged commit 75b33ad into main Apr 1, 2026
262 of 299 checks passed
@cheenamalhotra cheenamalhotra deleted the dev/mdaigle/pwsh-via-dotnet-tool branch April 1, 2026 06:26
@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board Apr 1, 2026
@paulmedynski paulmedynski removed the Hotfix 7.0.1 When this PR merges, automatically open a PR to cherry-pick to the 7.0.1 branch label Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants