From d38edf798d71334c24191bd6ab01049208bb8154 Mon Sep 17 00:00:00 2001
From: Gordon Lam <73506701+yeelam-gordon@users.noreply.github.com>
Date: Wed, 17 Dec 2025 18:10:21 +0800
Subject: [PATCH] Update a reminding vcxproj that reference WinAppSDK (#44316)
## Summary of the Pull Request
This pull request modernizes NuGet package management for the
`Microsoft.CommandPalette.Extensions` native project by migrating from
the older `packages.config` approach to the newer `PackageReference`
style. It also updates the related project references and output
handling in the toolkit project. These changes simplify dependency
management and align with current best practices for native C++/WinRT
projects.
**NuGet package management modernization:**
* Migrated `Microsoft.CommandPalette.Extensions.vcxproj` from
`packages.config` to `PackageReference` style, specifying dependencies
directly in the project file and removing the `packages.config` file.
[[1]](diffhunk://#diff-ff17a18a84e1c666c8f05468624d55167ac13d2c0e36724e0df3ce1d83bdbbd4L3-L12)
[[2]](diffhunk://#diff-ff17a18a84e1c666c8f05468624d55167ac13d2c0e36724e0df3ce1d83bdbbd4R27-R33)
[[3]](diffhunk://#diff-13e4e73ced13b2508639b5e93c39b0f1ee6a978109c60d33e3a9d16bf24024bfL1-L17)
* Removed legacy NuGet property groups, imports, and error-checking
targets related to manual package restore, as these are now handled
automatically by `PackageReference`.
[[1]](diffhunk://#diff-ff17a18a84e1c666c8f05468624d55167ac13d2c0e36724e0df3ce1d83bdbbd4L3-L12)
[[2]](diffhunk://#diff-ff17a18a84e1c666c8f05468624d55167ac13d2c0e36724e0df3ce1d83bdbbd4L165-L182)
**Project reference and build output updates:**
* Updated the project reference in
`Microsoft.CommandPalette.Extensions.Toolkit.csproj` to not reference
the output assembly directly, and added explicit inclusion and copying
of the native implementation DLL and WinMD files to the output
directory.
**Cleanup of unused files:**
* Removed `packages.config` from both the
`Microsoft.CommandPalette.Extensions` and `PowerRenameUILib` projects,
as dependencies are now managed via `PackageReference`.
[[1]](diffhunk://#diff-13e4e73ced13b2508639b5e93c39b0f1ee6a978109c60d33e3a9d16bf24024bfL1-L17)
[[2]](diffhunk://#diff-98d060eb88d212ec4ce70e1d30ec66043a998d67940648c917aa6609739d10d5L1-L19)
---
...t.CommandPalette.Extensions.Toolkit.csproj | 23 ++++++---
...icrosoft.CommandPalette.Extensions.vcxproj | 51 +++++++------------
.../packages.config | 17 -------
.../PowerRenameUILib/packages.config | 19 -------
4 files changed, 34 insertions(+), 76 deletions(-)
delete mode 100644 src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config
delete mode 100644 src/modules/powerrename/PowerRenameUILib/packages.config
diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Microsoft.CommandPalette.Extensions.Toolkit.csproj b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Microsoft.CommandPalette.Extensions.Toolkit.csproj
index eb887e9e36..24f2c50c5a 100644
--- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Microsoft.CommandPalette.Extensions.Toolkit.csproj
+++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Microsoft.CommandPalette.Extensions.Toolkit.csproj
@@ -3,10 +3,9 @@
-
+ $(MSBuildThisFileDirectory)..\..\..\..\..\
10.0.26100.57
-
- $(SolutionDir)$(Platform)\$(Configuration)\Microsoft.CommandPalette.Extensions.Toolkit
+ $(RepoRoot)$(Platform)\$(Configuration)\Microsoft.CommandPalette.Extensions.Toolkit
false
false
enable
@@ -21,7 +20,7 @@
true
true
- $(MSBuildThisFileDirectory)..\..\..\..\..\.pipelines\272MSSharedLibSN2048.snk
+ $(RepoRoot).pipelines\272MSSharedLibSN2048.snk
@@ -47,11 +46,19 @@
-
-
-
+
+ False
+ True
+
+
+
+
+ PreserveNewest
+
+
+
-
+
diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj
index fb647cc444..69793c6281 100644
--- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj
+++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj
@@ -1,16 +1,16 @@
-
- ..\..\..\..\..\
- $(PathToRoot)packages\Microsoft.WindowsAppSDK.1.8.250907003
- $(PathToRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5
- $(PathToRoot)packages\Microsoft.Windows.SDK.BuildTools.10.0.26100.6901
- $(PathToRoot)packages\Microsoft.Web.WebView2.1.0.2903.40
+
+
+ PackageReference
+
+ native,Version=v0.0
+
+ Windows
+ $(WindowsTargetPlatformVersion)
-
-
-
+ $(MSBuildThisFileDirectory)..\..\..\..\..\
true
true
true
@@ -25,7 +25,13 @@
10.0
10.0.19041.0
10.0.26100.0
+ false
+
+
+
+
+
@@ -45,10 +51,6 @@
x64
-
- $(SolutionDir)$(Platform)\$(Configuration)\Microsoft.CommandPalette.Extensions\
- obj\$(Platform)\$(Configuration)\
-
DynamicLibrary
v143
@@ -153,7 +155,6 @@
-
@@ -161,23 +162,9 @@
false
+
+ $(RepoRoot)$(Platform)\$(Configuration)\Microsoft.CommandPalette.Extensions\
+ obj\$(Platform)\$(Configuration)\
+
-
-
-
-
-
-
-
-
- This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config
deleted file mode 100644
index 091ef0782d..0000000000
--- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/modules/powerrename/PowerRenameUILib/packages.config b/src/modules/powerrename/PowerRenameUILib/packages.config
deleted file mode 100644
index 74414b51bc..0000000000
--- a/src/modules/powerrename/PowerRenameUILib/packages.config
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file