Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Sep 24, 2025

This PR cherry-picks commit ad07d5314c9115b9db413b7372e0a6502844df6c which sets up the extension build and sign pipeline infrastructure for the VS Code extension.

Changes included

Extension Build Infrastructure

  • Added extension/Extension.proj - New MSBuild project that handles VS Code extension compilation, packaging, and dependency verification
  • Integrated yarn and vsce tooling checks with clear error messages for missing dependencies
  • Automated .vsix package generation with pre-release versioning support

CI/CD Pipeline Enhancements

  • Updated Azure DevOps pipeline (eng/pipelines/azure-pipelines.yml) to install Node.js 20.x, yarn, and vsce globally
  • Enhanced build templates to support extension building in the internal pipeline
  • Added proper extension signing configuration in eng/Signing.props

Build System Integration

  • Updated eng/Build.props to conditionally include extension building via BuildExtension=true property
  • Simplified common build scripts (eng/common/build.ps1 and eng/common/build.sh) by moving extension-specific logic to MSBuild
  • Removed obsolete extension/loc/.gitignore file

Benefits

This infrastructure enables:

  • Automated VS Code extension building as part of the standard build process
  • Proper extension signing in the CI/CD pipeline
  • Consistent extension packaging across development and release environments
  • Better separation of concerns by moving extension build logic from shell scripts to MSBuild

The changes maintain backward compatibility - extension building is conditional and only enabled when explicitly requested via the BuildExtension property.

Original PR: #11504
Original Author: Adam Ratzman [email protected]


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

* first try extension CI

* move above other stages

* install vsce globally before package

* explicitly publish extension

* try add signing

* try #2

* Revert "try #2"

This reverts commit 8006a85.

* try to fix sign

* try with artifacts packages dir property

* remove verification

* clean up

* pr suggestions

* run stages in parallel

* see if this runs in parallel

* add restore back

* rename binlog

* remove extra upload step

* Move building extension to msbuild from the scripts. And always build extension on the internal pipeline

* fix typo

* fix build

* Don't try to parse errors and warnings from yarn/npm invocations. Only use the exit code to determine success or failure

* try publishing vsix

* update paths

* update paths 2

* Revert "update paths 2"

This reverts commit e178308.

* fix path to publish..?

---------

Co-authored-by: Ankit Jain <[email protected]>
Copilot AI changed the title [WIP] Cherry pick commit ad07d5314c9115b9db413b7372e0a6502844df6c into the branch and create a PR for the change. Cherry-pick extension build and sign pipeline setup Sep 24, 2025
Copilot finished work on behalf of mitchdenny September 24, 2025 00:42
Copilot AI requested a review from mitchdenny September 24, 2025 00:42
@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 11618

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 11618"

@mitchdenny mitchdenny changed the title Cherry-pick extension build and sign pipeline setup [release/9.5] Cherry-pick extension build and sign pipeline setup Sep 24, 2025
@adamint adamint marked this pull request as ready for review September 25, 2025 16:52
@Copilot Copilot AI review requested due to automatic review settings September 25, 2025 16:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR cherry-picks infrastructure changes to enable automated VS Code extension building and signing as part of the standard CI/CD pipeline. It introduces proper MSBuild integration for extension compilation, packaging, and dependency verification.

Key changes:

  • Replaced shell script extension building with MSBuild-based approach for better integration
  • Added CI/CD pipeline support for Node.js tooling (yarn, vsce) and extension artifact publishing
  • Enhanced signing configuration to properly handle .vsix extension packages

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
extension/Extension.proj New MSBuild project handling extension compilation, packaging, and tooling validation
extension/loc/.gitignore Removed obsolete gitignore file
eng/pipelines/azure-pipelines.yml Added Node.js 20.x, yarn, and vsce installation steps
eng/pipelines/templates/BuildAndTest.yml Added extension building flag and artifact publishing
eng/common/build.sh Removed shell-based extension building logic, added MSBuild property
eng/common/build.ps1 Removed PowerShell-based extension building logic, added MSBuild property
eng/Signing.props Added .vsix signing configuration and artifact inclusion
eng/Build.props Added conditional extension project inclusion

<MakeDir Directories="$(ArtifactsPackagesDir)\vscode" />

<!-- Package extension -->
<Exec Command="vsce package --pre-release --out $(ArtifactsPackagesDir)\vscode\aspire-vscode-$(_ExtractedVersion).vsix"
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

The hardcoded Windows-style path separator \ will cause issues on Linux/macOS. Use MSBuild's path normalization or cross-platform path separators.

Copilot uses AI. Check for mistakes.
<Exec Command="yarn compile" WorkingDirectory="$(ExtensionSrcDir)" IgnoreStandardErrorWarningFormat="true" />

<!-- Make extension directory -->
<MakeDir Directories="$(ArtifactsPackagesDir)\vscode" />
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

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

The hardcoded Windows-style path separator \ should be replaced with MSBuild's $([MSBuild]::NormalizePath()) or use forward slashes for cross-platform compatibility.

Suggested change
<MakeDir Directories="$(ArtifactsPackagesDir)\vscode" />
<MakeDir Directories="$([MSBuild]::NormalizePath($(ArtifactsPackagesDir), 'vscode'))" />

Copilot uses AI. Check for mistakes.
This was referenced Oct 24, 2025
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.

4 participants