Skip to content

Fix nuget.exe restore finding MSBuild from SSMS instead of Visual Studio#6530

Merged
zivkan merged 1 commit intoNuGet:devfrom
bdukes:ignore-ssms-msbuild
Jul 15, 2025
Merged

Fix nuget.exe restore finding MSBuild from SSMS instead of Visual Studio#6530
zivkan merged 1 commit intoNuGet:devfrom
bdukes:ignore-ssms-msbuild

Conversation

@bdukes
Copy link
Copy Markdown
Contributor

@bdukes bdukes commented Jul 2, 2025

Bug

Fixes: NuGet/Home#14349

Description

SQL Server Management Studio (SSMS) 21 is now managed using the Visual Studio Installer, which causes its version of MSBuild to get picked up as an SXS toolset to use by nuget.exe. This PR uses the Installation Name of the SXS toolset to determine whether it's a Visual Studio product or not, and thereby exclude SSMS from the considered options.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@bdukes bdukes requested a review from a team as a code owner July 2, 2025 21:29
@bdukes bdukes requested review from nkolev92 and zivkan July 2, 2025 21:29
@dotnet-policy-service dotnet-policy-service bot added the Community PRs created by someone not in the NuGet team label Jul 2, 2025
@nkolev92 nkolev92 requested a review from jeffkl July 3, 2025 00:57
Copy link
Copy Markdown
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

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

Changes look good to me, but tagging @rainersigwald in case he has any suggestions here.

I think the test failures are infrastructure and not something from your PR.

Copy link
Copy Markdown
Contributor

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

Would this exclude Build Tools?

@bdukes
Copy link
Copy Markdown
Contributor Author

bdukes commented Jul 7, 2025

Would this exclude Build Tools?

Build Tools also uses the VisualStudio/ prefix, so this will not exclude Build Tools.

@jeffkl
Copy link
Copy Markdown
Contributor

jeffkl commented Jul 8, 2025

@bdukes please rebase your branch, our CI was failing last week and is fixed now.

@bdukes bdukes force-pushed the ignore-ssms-msbuild branch from 903ca48 to c105acc Compare July 8, 2025 22:30
@bdukes
Copy link
Copy Markdown
Contributor Author

bdukes commented Jul 8, 2025

@bdukes please rebase your branch, our CI was failing last week and is fixed now.

done

@bdukes bdukes force-pushed the ignore-ssms-msbuild branch from c105acc to d702e42 Compare July 10, 2025 21:59
@zivkan zivkan merged commit 873a8a8 into NuGet:dev Jul 15, 2025
17 checks passed
@bdukes bdukes deleted the ignore-ssms-msbuild branch July 15, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community PRs created by someone not in the NuGet team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NuGet Restore fails if SQL Server Management Studio 21 is installed

6 participants