[2.0-stable port] Remove dead PackageReferences from the C++ VSIX extension project - #6742
Conversation
Port of PR #6741 to release/dev/monobuild-2.0-stable. Applied natively rather than cherry-picked because the VSIX project lives at a different path on this branch: dev/VSIX/Extension/Cpp/Dev17/ here versus dev/Templates/VSIX/Extension/Cpp/Dev17/ on release/dev/monobuild. The file contents are byte-identical, so the resulting diff matches the source PR exactly: 0 insertions / 12 deletions in the csproj and 0 / 6 in Directory.Packages.props. The defect is present on this branch identically. The Cpp Dev17 VSIX project carried four PackageReferences declared GeneratePathProperty="true" with <ExcludeAssets>All</ExcludeAssets>. That combination flows no assets, so the only thing such a reference produces is its $(Pkg<Id>) path property, and none of the four is referenced anywhere on this branch: PkgMicrosoft_WindowsAppSDK 0 uses PkgMicrosoft_Windows_CppWinRT 0 uses PkgMicrosoft_Windows_SDK_BuildTools 0 uses PkgMicrosoft_Windows_ImplementationLibrary 0 uses PkgNuget_VisualStudio 2 uses <- the one that IS used, kept The Microsoft.WindowsAppSDK one pinned the public 1.6.250408002 metapackage, an April 2025 release, declared as a bare literal under "External Package Versions" rather than through the WindowsAppSDKVersionPinned pattern the internal packages use, so nothing could ever update it. Removing the reference orphans its CPM entries, so the Self-Reference ItemGroup and the MicrosoftWindowsAppSDKVersion property go too. After the change no PackageReference to the metapackage remains anywhere in the repo, so the CPM entry cannot be needed. Deliberately NOT touched: * MicrosoftWindowsAppSDKVersionPackageVersion (1.8.0) - a different, similarly named property that BuildAll.ps1 reads for pipeline version metadata. * test/ABForward/packages.config, which pins 1.6.250408002 through packages.config. That does not resolve via Central Package Management, so the compat-test self-reference the deleted ItemGroup comment referred to is unaffected. (This branch has only that one such test; release/dev/monobuild also has test/TestApps/StoragePickersTestApp.) * The same dead Microsoft.Windows.SDK.BuildTools pattern in the sibling Cs Dev17 project - left for a separate change, as on the source PR. This branch's Directory.Packages.props legitimately diverges from release/dev/monobuild in its fallback literals (Base 2.0.4, FrameworkUdk 2.0.0-stable-27200.1029.260616-0840.3, and so on). None of those were touched - only the two orphaned self-reference entries were removed.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
The source PR (#6741) is now merged as Post-merge validation on the source side (157038503) rebuilt the Foundation stage against the merged commit and passed: all 4 Foundation arches + 4 MRT arches + AnyCPU + Pack green, and across 1035 task logs 0 failed tasks, 0 NU1010/NU1008, 0 'Unable to find version'. NU1010 is the specific error a removed \PackageVersion\ would cause if a versionless \PackageReference\ were left stranded — zero occurrences confirms none is. The code here is identical apart from the |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. |
ef97d99
into
release/dev/monobuild-2.0-stable
Port of #6741 to
release/dev/monobuild-2.0-stable.Applied natively rather than cherry-picked because the VSIX project lives at a different path on this branch:
dev/VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csprojrelease/dev/monobuild:dev/Templates/VSIX/Extension/Cpp/Dev17/...The file contents are byte-identical, so the resulting diff matches the source exactly: 0 insertions / 12 deletions in the csproj and 0 / 6 in
Directory.Packages.props.The defect is present here identically
The Cpp Dev17 VSIX project carried four
PackageReferenceentries declaredGeneratePathProperty="true"with<ExcludeAssets>All</ExcludeAssets>. That combination flows no compile, runtime, build, native, contentfiles or analyzer assets, so the only thing such a reference produces is its$(Pkg<Id>)path property — and none of the four is referenced anywhere on this branch:PkgMicrosoft_WindowsAppSDKPkgMicrosoft_Windows_CppWinRTPkgMicrosoft_Windows_SDK_BuildToolsPkgMicrosoft_Windows_ImplementationLibraryPkgNuget_VisualStudioSo the four only cost a package download per build and contribute nothing to the produced
.vsix.Why the WindowsAppSDK one matters most
It is a self-reference pinned to the public 1.6.250408002 metapackage — an April 2025 release — declared in
Directory.Packages.propsunder "External Package Versions" as a bare literal, not via the$([MSBuild]::ValueOrDefault('$(WindowsAppSDKVersionPinned)', ...))pattern the internal packages use. Nothing could ever update it.Removing the reference orphans its CPM entries, so the
Self-ReferenceItemGroupand theMicrosoftWindowsAppSDKVersionproperty go too. After the change noPackageReferenceto the metapackage remains anywhere in the repo, so the CPM entry cannot be needed.Deliberately not touched
MicrosoftWindowsAppSDKVersionPackageVersion(1.8.0) — confusingly similar name, different purpose:BuildAll.ps1reads it for pipeline version metadata.test/ABForward/packages.config, which pins1.6.250408002.packages.configdoes not resolve through Central Package Management, so the compat-test self-reference the deleted comment referred to is unaffected. (This branch has only that one such test;release/dev/monobuildalso hastest/TestApps/StoragePickersTestApp.)Microsoft.Windows.SDK.BuildToolspattern in the sibling Cs Dev17 project — left for a separate change, as on the source PR.Branch divergence preserved
This branch's
Directory.Packages.propslegitimately differs from main-line in its fallback literals — Base2.0.4, FrameworkUdk2.0.0-stable-27200.1029.260616-0840.3, IXP2.0.16-stable-Rolling.20260617.1, AppLicensing2.0.0-stable.20260423.1. None were touched; only the two orphaned self-reference entries were removed. A file copy from main-line would have silently reverted every one of them.Validation
raw numstat == -w numstaton both files — pure deletions, no whitespace churn.Directory.Packages.props131 → 125 LF (0 CRLF), csproj 247 → 235 LF (0 CRLF).PackageReference Include="Microsoft.WindowsAppSDK"in any.csproj/.vcxproj/.props/.targets/.proj, so the removedPackageVersioncannot strand a versionless reference (NU1010).On the source PR, mono-build 157025355 rebuilt
CreateVSIXagainst the branch and succeeded — all four.vsixfiles built and signed, andInstalled Microsoft.WindowsAppSDK 1.6.250408002no longer appears. A second run covering the other consumers of this CPM file (BasePackage+Foundation) is in flight there. The code here is identical, so those results carry over; the 2.0 mono-build consumes this branch viaFoundationBranchdefaulting torelease/dev/monobuild-2.0-stable.