Skip to content

Remove vendored Command Palette SDK - #31

Merged
nickknissen merged 2 commits into
mainfrom
remove-vendored-cmdpal-sdk
Jun 9, 2026
Merged

nickknissen merged 2 commits into
mainfrom
remove-vendored-cmdpal-sdk

Conversation

@nickknissen

Copy link
Copy Markdown
Owner

The CmdPal host builds the cross-process IExtension proxy from the SDK's interface metadata, so Microsoft.CommandPalette.Extensions.winmd must ship in the package — otherwise activation fails with E_NOINTERFACE (0x80004002) and the extension loads with no commands.

The previous approach vendored the DLL/winmd in tools/cmdpal-sdk and swapped them in at pack time, assuming it was load-bearing for WinRT IID matching. It isn't — the NuGet package IIDs already match the host. The only thing the override actually provided was the winmd in the package.

This PR removes the vendoring and replaces it with the IncludeCmdPalSdkWinmdInPublish csproj target, which forces the NuGet-provided winmd into the publish output (the SDK package marks it CopyToOutputDirectory but not CopyToPublishDirectory, so dotnet publish otherwise drops it).

Built the unsigned MSIX and verified both the DLL and the winmd are present at the package root.

Note: not yet smoke-tested in CmdPal — recommend a quick dev-deploy before merge.

Drop the committed tools/cmdpal-sdk DLL/winmd and the build-msix.ps1
override that swapped them into the package. Build against the plain
NuGet Microsoft.CommandPalette.Extensions package instead.

The override was assumed to be load-bearing for WinRT IID matching, but
the IIDs in the NuGet package already match the CmdPal host. What the
override actually provided was Microsoft.CommandPalette.Extensions.winmd
in the package — the host builds the cross-process IExtension proxy from
that metadata, and without it activation fails with E_NOINTERFACE and the
extension loads with no commands.

The SDK package marks the winmd CopyToOutputDirectory but not
CopyToPublishDirectory, so dotnet publish drops it. Add the
IncludeCmdPalSdkWinmdInPublish target to force it into the publish output.
@nickknissen
nickknissen force-pushed the remove-vendored-cmdpal-sdk branch from 5e47714 to d6e2740 Compare June 2, 2026 05:58
@nickknissen
nickknissen merged commit e695719 into main Jun 9, 2026
2 checks passed
@nickknissen
nickknissen deleted the remove-vendored-cmdpal-sdk branch June 9, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant