Repository navigation
[tools] Remove unused vswhere wrapper - #13410
Conversation
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]>
There was a problem hiding this comment.
🟢 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.projNuGet 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
|
@dalexsoto review |
dalexsoto
left a comment
There was a problem hiding this comment.
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.
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]>
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]>
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]>
Context: #8445
Commit afd1274 removed the
Xamarin.ProjectToolscallers ofXamarin.Android.Tools.VSWhere.MSBuildLocator.QueryLatest(). The localtools/vswhere/netstandard2.0 library consequently has no code callers, but remains referenced byXamarin.ProjectTools.csprojandMicrosoft.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.exeintegrations inbuild.cmd,build-tools/scripts/vswhere.cmd,eng/common/tools.ps1, andbuild-tools/automation/dnceng/arcade/Workloads.projremain unchanged, including the NuGet package used byWorkloads.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 becausexa-prep-tasks.dllwas 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 compiledXamarin.ProjectTools.deps.jsoncontains novswheredependency.Full SDK/device tests were not run for this unused-library removal. Windows executable integrations were verified unchanged, not executed on the macOS host.