Skip to content

Conversation

@vanzue
Copy link
Contributor

@vanzue vanzue commented Dec 8, 2025

Summary of the Pull Request

Error from pipeline:

Invalid input 'PowerToys.slnx'. The file type was not recognized.
MSBuild version 17.14.23+b0019275e for .NET Framework
Build started 12/8/2025 6:33:14 AM.

Nuget support for slnx will be ready in nuget version 7, so use msbuild to restore

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

image

Copy link
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 fixes a pipeline build failure in the Command Palette SDK build script by switching from nuget.exe restore to MSBuild-based restore for the PowerToys.slnx solution file. NuGet version 6 doesn't recognize the .slnx file format, which will be supported in NuGet version 7. Additionally, the Microsoft.Windows.SDK.BuildTools package version is updated to 10.0.26100.6901 to align with the version already specified in Directory.Packages.props.

Key changes:

  • Replace nuget.exe restore with msbuild.exe /t:restore /p:RestorePackagesConfig=true for .slnx compatibility
  • Update Microsoft.Windows.SDK.BuildTools from version 10.0.26100.4188 to 10.0.26100.6901 across packages.config and project files

Reviewed changes

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

File Description
src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 Replaced nuget restore with MSBuild restore command for .slnx solution; added $solutionPath variable
src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config Updated Microsoft.Windows.SDK.BuildTools version to align with repo-wide version
src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj Updated WindowsSdkBuildToolsNuget path to reference new SDK version

& $nugetPath restore (Join-Path $PSScriptRoot "..\..\..\..\..\PowerToys.slnx")
$restoreArgs = @(
$solutionPath
"/t:Restore"
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

The target name should use lowercase /t:restore to match the established pattern used consistently throughout the codebase (see tools/build/build-common.ps1:90 and tools/build/build-installer.ps1:144). While MSBuild target names are case-insensitive, following the existing convention improves code consistency.

Suggested change:

"/t:restore"
Suggested change
"/t:Restore"
"/t:restore"

Copilot uses AI. Check for mistakes.
"/t:Restore"
"/p:RestorePackagesConfig=true"
)
& $msbuildPath $restoreArgs
Copy link

Copilot AI Dec 8, 2025

Choose a reason for hiding this comment

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

The MSBuild restore command should check $LASTEXITCODE and exit on failure, following the pattern used in tools/build/build-common.ps1:71-75. Without this check, if the restore fails, the script will continue to the build step, potentially causing confusing downstream errors.

Suggested addition after line 65:

if ($LASTEXITCODE -ne 0) {
  Write-Error "NuGet restore failed for $solutionPath"
  Exit $LASTEXITCODE
}
Suggested change
& $msbuildPath $restoreArgs
& $msbuildPath $restoreArgs
if ($LASTEXITCODE -ne 0) {
Write-Error "NuGet restore failed for $solutionPath"
Exit $LASTEXITCODE
}

Copilot uses AI. Check for mistakes.
@vanzue vanzue marked this pull request as ready for review December 8, 2025 11:37
@vanzue vanzue requested a review from a team as a code owner December 8, 2025 11:37
@michaeljolley michaeljolley added the Product-Command Palette Refers to the Command Palette utility label Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product-Command Palette Refers to the Command Palette utility

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants