Skip to content

Distribute a modern .vsix via VSIX Gallery and SSMS Gallery#2

Merged
mourier merged 7 commits into
mainfrom
worktree-vsix-gallery-publishing
Jun 22, 2026
Merged

Distribute a modern .vsix via VSIX Gallery and SSMS Gallery#2
mourier merged 7 commits into
mainfrom
worktree-vsix-gallery-publishing

Conversation

@mourier

@mourier mourier commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Adds discoverability via the VSIX Gallery and the new SSMS Gallery (see #1) by producing a modern (SSMS 21–22) .vsix as a purely additive output of the existing release pipeline.

Approach

A .vsix is just an OPC ZIP. release.yml already assembles the SSMS22/ layout (DLLs from SqlPilotDlls.txt + pkgdef + PackageManifest 2.0 manifest + manifest.json + catalog.json), so we zip a separate staging copy of it plus a generated [Content_Types].xml. Payload parity with the installer is automatic via the shared single-source-of-truth DLL list.

The MSBuild <CreateVsixContainer> route was empirically ruled out — it's inert in this SDK-style project (the VSSDK target never wires up because source.extension.vsixmanifest is only auto-globbed), so it produces no .vsix. Documented in SSMS_INTEGRATION_NOTES.md.

Existing flow is unchanged

  • The .vsix is built from a separate $vsixStaging dir, so the loose-file SSMS22/ folder and the payload ZIP are byte-for-byte identical to before.
  • No csproj/build change. No change to Deploy-Dev.ps1, the installers, or the installer ZIP.
  • Verified locally: modern package builds clean, 44/44 Core tests pass, the produced .vsix is a valid 15-entry OPC package (manifest parses as PackageManifest 2.0, payload == the 10 shipped DLLs, no vendored Microsoft DLLs or PDBs leaked).

Commits

  • Reconcile ship manifest with actual shipped DLLs — drops 3 never-built System.Text.Json-family entries from SqlPilotDlls.txt and fixes manifest.json files[] to list the true 10 shipped DLLs. (Pre-existing drift; the loose-file payload is unaffected since those DLLs were never produced.)
  • Build modern .vsix as an additive release artifactrelease.yml zips the SSMS22/ layout + [Content_Types].xml into SqlPilot-<tag>.vsix and attaches it to the release.
  • Publish modern .vsix to VSIX Gallery and SSMS Gallery on release — gated to non-prerelease tags; manage tokens from repo secrets.
  • Document .vsix gallery distribution channel — README badge + install note (SSMS 22 only; 18/20 stay installer-only), ARCHITECTURE/INSTALL/INTEGRATION_NOTES.

Before this publishes (manual prerequisites)

  • Install gate: install SqlPilot-<tag>.vsix on a real SSMS 22 and confirm SQL Pilot loads (no automated test installs into live SSMS).
  • Create repo secrets VSIXGALLERY_TOKEN and SSMSGALLERY_TOKEN (the per-gallery X-Manage-Token values).
  • Push the first real vX.Y.Z tag (no - suffix) to trigger the gallery publish. Prerelease tags build/attach the .vsix but skip publishing.

The modern manifest targets SSMS [21.0,23.0); bump the upper bound per release after testing a new SSMS rather than open-ending it.

Summary by CodeRabbit

  • New Features
    • Added a standalone Modern SSMS22 VSIX release artifact.
    • Non-prerelease releases now publish the VSIX to both the VSIX Gallery and SSMS Gallery, and include it as a downloadable release asset alongside existing ZIPs.
  • Documentation
    • Added a VSIX-based SSMS 22 installation alternative, plus an updated architecture/SSMS integration guide describing the VSIX packaging approach and version targeting policy.
  • Chores
    • Updated the packaged VSIX dependency set (system DLL list) used for the SSMS22 payload.

mourier added 4 commits June 19, 2026 13:45
Drop never-built System.Text.Json family from the DLL whitelist and
manifest.json (the codebase deliberately avoids System.Text.Json), and
add the five System.* DLLs that actually ship to manifest.json files[].
No change to the loose-file payload — the phantom DLLs were never
produced. Makes manifest.json accurate for VSIX catalog installs.
Zip the already-assembled SSMS22 layout (built from SqlPilotDlls.txt)
plus an OPC [Content_Types].xml into SqlPilot-<tag>.vsix and attach it
to the release. Built from a separate staging copy so the loose-file
payload ZIP is unchanged. No csproj/build change — the VSSDK
CreateVsixContainer target does not wire up in this SDK-style project.
Upload SqlPilot-<tag>.vsix to both galleries after the GitHub release.
Gated to non-prerelease tags. Manage tokens come from repo secrets
VSIXGALLERY_TOKEN / SSMSGALLERY_TOKEN.
Add VSIX Gallery badge + install note (SSMS 22 only; 18/20 stay
installer-only), document the additive .vsix release step and the
[21.0,23.0) target/bump policy, and record that CreateVsixContainer is
inert in this SDK-style project (use the zip-the-SSMS22-folder approach).
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f7b477eb-f14f-463e-b725-ab5f11e7fc54

📥 Commits

Reviewing files that changed from the base of the PR and between 5ae8046 and bd6d523.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • docs/SSMS_INTEGRATION_NOTES.md
✅ Files skipped from review due to trivial changes (1)
  • docs/SSMS_INTEGRATION_NOTES.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release.yml

📝 Walkthrough

Walkthrough

Adds VSIX artifact generation to the release workflow by staging the SSMS22 folder, writing [Content_Types].xml, and packaging as an OPC ZIP. Extends GitHub Release assets to include the .vsix and adds conditional publishing to VSIX Gallery and SSMS Gallery for non-prerelease tags. Updates bundled DLL dependencies, replacing System.Text.Json-related assemblies with System.Buffers/System.Memory group, and adds documentation for the new install path.

Changes

VSIX artifact, dependency manifest, and publishing

Layer / File(s) Summary
Dependency manifest update
build/SqlPilotDlls.txt, src/SqlPilot.Package/manifest.json
Removes System.Text.Json.dll, System.Text.Encodings.Web.dll, and System.ValueTuple.dll; adds System.Buffers.dll, System.Memory.dll, System.Numerics.Vectors.dll, System.Runtime.CompilerServices.Unsafe.dll, and System.Threading.Tasks.Extensions.dll in both the DLL list and the VSIX files array.
VSIX staging, packaging, and gallery publishing
.github/workflows/release.yml
Adds a VSIX build step that copies the SSMS22 payload to vsix-staging/, writes a generated [Content_Types].xml, and zips it as artifacts/SqlPilot-$tag.vsix. Expands the GitHub Release asset upload to include *.vsix. Adds a conditional step (non-prerelease tags only) that verifies the VSIX exists and POSTs it to both the VSIX Gallery and SSMS Gallery using secrets-backed tokens.
Documentation and README
README.md, docs/INSTALL.md, docs/ARCHITECTURE.md, docs/SSMS_INTEGRATION_NOTES.md
Adds VSIX Gallery badge and SSMS 22 alternate install section to README; adds matching section to INSTALL.md; updates ARCHITECTURE.md to document the third release asset and the [21.0,23.0) version-target policy; adds a bullet to SSMS_INTEGRATION_NOTES.md explaining why CreateVsixContainer is ineffective and how the pipeline generates the VSIX.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hop, hop, the VSIX is packed,
With Buffers and Memory, all stacked,
The gallery gets a POST,
From coast to bunny coast,
A .vsix shipped — and that's a fact! 🎉

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Distribute a modern .vsix via VSIX Gallery and SSMS Gallery' accurately and specifically summarizes the primary change: adding .vsix distribution through two gallery channels.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch worktree-vsix-gallery-publishing

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 230-236: After the first curl.exe call that publishes to the
Visual Studio Gallery (the one using the $vg variable and VSIXGALLERY_TOKEN),
add an explicit check for $LASTEXITCODE and throw an error if the exit code
indicates failure. Similarly, after the second curl.exe call that publishes to
SSMS Gallery (the one using the $sg variable and SSMSGALLERY_TOKEN), add another
$LASTEXITCODE check to catch any failure in that upload. This ensures that if
either gallery upload fails, the workflow step will fail immediately rather than
allowing a subsequent successful upload to mask a prior failure.
- Around line 168-177: The PowerShell here-string syntax `@' ... '@` used to
define the XML contentTypes variable is breaking YAML parsing because YAML
doesn't recognize PowerShell syntax. Replace the here-string delimiters with
YAML's literal block scalar syntax (using `|-` or `|`) to properly define the
multi-line XML content while maintaining valid YAML structure. The XML content
can remain unchanged, but the outer PowerShell here-string syntax needs to be
replaced with YAML block scalar notation so the workflow file can be parsed
correctly by actionlint and yamllint.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 982f3040-d1b9-47d6-8534-00f946f5f85f

📥 Commits

Reviewing files that changed from the base of the PR and between 2c60139 and 409c8df.

📒 Files selected for processing (7)
  • .github/workflows/release.yml
  • README.md
  • build/SqlPilotDlls.txt
  • docs/ARCHITECTURE.md
  • docs/INSTALL.md
  • docs/SSMS_INTEGRATION_NOTES.md
  • src/SqlPilot.Package/manifest.json
💤 Files with no reviewable changes (1)
  • build/SqlPilotDlls.txt

Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml
mourier added 3 commits June 22, 2026 09:34
…ring

The @'...'@ here-string placed its content at column 0, which terminates
the YAML run: literal block and made the workflow file invalid (GitHub
rejected it before any job ran). Build the XML via an indented array-join
instead so every line stays within the block.
Check $LASTEXITCODE after each curl so a failed VSIX Gallery upload
isn't masked by a successful SSMS Gallery upload (pwsh does not fail the
step on a native non-zero exit).
The modern SSMS 22 VSIXInstaller rejects a .vsix that contains the
loose-file deployment descriptors (catalog.json/manifest.json) with
'InvalidExtensionManifestException: version Invalid'. Strip them from the
.vsix staging copy only; the payload ZIP still ships them for the
file-copy installer. Verified: stripped .vsix installs with exit 0 to the
per-user SSMS 22 Extensions store. Documented in SSMS_INTEGRATION_NOTES.
@mourier mourier merged commit 7f6c39f into main Jun 22, 2026
3 of 4 checks passed
@mourier mourier deleted the worktree-vsix-gallery-publishing branch June 22, 2026 11:01
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