Skip to content

[tools] Remove unused vswhere wrapper - #13410

Merged
simonrozsival merged 1 commit into
mainfrom
simonrozsival-remove-vswhere-wrapper
Nov 6, 2026
Merged

simonrozsival merged 1 commit into
mainfrom
simonrozsival-remove-vswhere-wrapper

Conversation

@simonrozsival

@simonrozsival simonrozsival commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

Context: #8445

Commit afd1274 removed the Xamarin.ProjectTools callers of Xamarin.Android.Tools.VSWhere.MSBuildLocator.QueryLatest(). The local tools/vswhere/ netstandard2.0 library consequently has no code callers, but remains referenced by Xamarin.ProjectTools.csproj and Microsoft.Android.Build.Tasks.slnx.

Remove the unused wrapper and those two references. An audit of tracked sources, documentation, configuration, and scripts found no other references to the local library. Microsoft's vswhere.exe integrations in build.cmd, build-tools/scripts/vswhere.cmd, eng/common/tools.ps1, and build-tools/automation/dnceng/arcade/Workloads.proj remain unchanged, including the NuGet package used by Workloads.proj.

Validation:

  • dotnet build build-tools/xa-prep-tasks/xa-prep-tasks.csproj -v minimal — passed, zero warnings/errors.
  • dotnet build src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Xamarin.ProjectTools.csproj -v minimal — passed, zero warnings/errors. The initial build failed with MSB4062 because xa-prep-tasks.dll was missing; building the prerequisite above resolved it.
  • dotnet sln Microsoft.Android.Build.Tasks.slnx list — passed; the wrapper is absent.
  • git diff --check — passed.
  • git grep -n -i -e vswhere -e MSBuildLocator -e VisualStudioInstance — only the preserved executable integrations remain. XML parsing passed, and the compiled Xamarin.ProjectTools.deps.json contains no vswhere dependency.

Full SDK/device tests were not run for this unused-library removal. Windows executable integrations were verified unchanged, not executed on the macOS host.

The local Xamarin.Android.Tools.VSWhere library has no remaining code
callers since afd1274 removed its
Xamarin.ProjectTools consumers in #8445.

Delete the wrapper and its obsolete project and solution references.
Keep the Microsoft vswhere.exe integrations and NuGet package intact.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 5, 2026 14:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues remain for the removal of the unused vswhere wrapper.

No open issues 🎉

What changed in this PR

Removes the unused local vswhere wrapper after its consumers were removed in #8445, simplifying the build-test tooling without changing Microsoft’s vswhere.exe integrations.

Changes:

  • Deletes the wrapper project and its two C# classes.
  • Removes the obsolete project reference and solution entry.
  • Leaves existing executable integrations and the Workloads.proj NuGet dependency unchanged.
File Description
tools/​vswhere/​vswhere.csproj Deletes the unused wrapper project.
tools/​vswhere/​VisualStudioInstance.cs Deletes the wrapper’s instance data class.
tools/​vswhere/​MSBuildLocator.cs Deletes the unused MSBuild discovery implementation.
src/​Xamarin.Android.Build.Tasks/​Tests/​Xamarin.ProjectTools/​Xamarin.ProjectTools.csproj Removes the wrapper project reference.
Microsoft.Android.Build.Tasks.slnx Removes the wrapper solution entry.

Review effort: Balanced

@simonrozsival simonrozsival added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Nov 6, 2026
@simonrozsival

Copy link
Copy Markdown
Member Author

@dalexsoto review

@simonrozsival
simonrozsival enabled auto-merge (squash) November 6, 2026 11:39

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed all five changed files and the material source consumers, project/import/package references and Visual Studio discovery paths. The unused managed wrapper and its two references are removed without changing the separate Microsoft vswhere.exe integrations. Actual-target integration and a separate final independent-blocker pass found no high-confidence blocking issue.

Static source review only; no repository code, builds, tests or executable integrations were run.

@simonrozsival
simonrozsival merged commit d322fcd into main Nov 6, 2026
41 checks passed
@simonrozsival
simonrozsival deleted the simonrozsival-remove-vswhere-wrapper branch November 6, 2026 12:29
simonrozsival added a commit that referenced this pull request Nov 9, 2026
Context: #13410

Merge main at aa74d1f.  Keep the upstream deletion of the unused
vswhere wrapper and its project references rather than restoring the
native capture changes to a retired owner.  Preserve the latest shared
assembly-store test layout and its dependency retirement as well.

The native harness and timeout-tail fixes are unchanged.  With the new
repository SDK, both actual host and device owners build, all 20 host
process policies pass, and the three accelerated compiled-owner timeout
tail checks retain both diagnostics while cleaning up their owned trees.

Co-authored-by: Copilot App <[email protected]>
simonrozsival added a commit that referenced this pull request Nov 11, 2026
Context: #13410

Upstream removed tools/vswhere, but the Windows-only designer task-host test still needs Visual Studio MSBuild.exe to validate the Full MSBuild TaskHostFactory registration. Query vswhere.exe directly from the test instead of restoring the removed library.

Co-authored-by: Copilot App <[email protected]>
simonrozsival added a commit that referenced this pull request Nov 11, 2026
Context: #13410

vswhere is gone from the repository, and the only test needing it ran the designer registration under Visual Studio MSBuild.exe on Windows. Remove those two cases rather than reintroducing vswhere. The remaining cases still assert the Full (TaskHostFactory) and Core registrations statically, and run the registration under .NET MSBuild with and without -mt.

Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants