Fix platform-specific builds via CI matrix#4
Open
josh-hemphill wants to merge 1 commit into
Open
Conversation
Build per-target VSIXes with architecture derived from the vsce target: RID for .NET Core apphosts, PlatformTarget for the net481 designer. Adds GitHub Actions test/package/publish workflow and a -All local cross-publish path; fixes dead package.json script references.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Releases were packaged as a single generic VSIX built on the author's ARM
machine. Because
dotnet publishwas called without a Runtime Identifier, thebundled .NET apphosts (
XamlDesigner.exe,wpf-xaml-ls.exe,wpf-project-analyzer) were ARM64 native — but shipped to all users,including x64. x64 users got binaries that don't run.
There was also no CI, and
package.jsonreferenced scripts that don't exist(
dist.windows.ps1,publish.ps1).Fix
Build platform-specific VSIXes on matching CI runners, with architecture
derived automatically from the vsce target:
XamlDesigner.exe,wpf-xaml-ls.exe,wpf-project-analyzer-r win-x64)x64/ARM64)WpfHotReload.Runtime.dllChanges
.github/workflows/ci.yml— new:test→ 6-legpackagematrix → tag-gatedpublishdist.all.ps1—-Target,-RuntimeIdentifier,-PlatformTarget, and-All; RID/PlatformTarget derived from-Targetscripts/build-designer.ps1— RID for modern designer, PlatformTarget for net481XamlLanguageServer.Wpf.csproj— R2R enabled only when a RID is presentpackage.json— fixed dead script referencesCLAUDE.md— documents build/release + local cross-publishingCross-arch correctness is now automatic
Since the RID comes from
-Target, you can build a correct package for anyplatform from any machine (e.g. a valid x64 VSIX on your ARM laptop).
How to publish (for author)
Recommended: let CI publish (one-time setup)
VSCE_PAT(Settings → Secrets and variables → Actions → New repository secret).
publishjob runs after all sixpackagelegs succeed and publishesevery platform VSIX in one shot. Marketplace routes each target to the
matching VS Code host.
Until
VSCE_PATis set up: publish locallyAuthenticate once, then build + publish everything:
Or build all without publishing (inspect first):
Publishing a single platform (or skipping a broken one)
Each target is independent — build/publish them one at a time:
Drop
-Publishto only produce the.vsix. To publish a.vsixyou alreadybuilt:
Valid targets:
win32-x64,win32-arm64,darwin-x64,darwin-arm64,linux-x64,linux-arm64.Notes / things to watch
RID, so this works from any host. The net481 designer uses
PlatformTarget;building the
win32-arm64leg's net481 variant is unusual for .NET Frameworkand is the most likely leg to need attention — it runs on the
windows-11-armrunner in CI.
--target,the Marketplace expects a package for every supported platform at that version.
Publish all legs for the same version (CI does this automatically).
individually (commands above) and add the missing one later under the same
version.