Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 11, 2025

This PR implements a servicing hotfix to enable Visual Studio 17.14 to use online templates instead of local ones by implementing platform-aware template URL generation and CI pipeline support for VS-specific template releases.

Changes Implemented

Template Configuration

Updated packages/fx-core/src/common/templates-config.json to support VS-specific template downloads:

  • Added vstagPrefix: "templates-vs@" for VS template release tags
  • Added vsversion: "18.0.0" for stable VS template version
  • Updated URLs to point to microsoft-365-agents-toolkit repository

Generator Logic

Enhanced template generation to support platform-specific behavior:

  • Added platform-aware getTemplateUrl() function that detects VS vs VSCode platforms
  • Implemented getTemplateVSUrl() for VS-specific template URL generation
  • Added support for three VS template release channels:

CI Pipeline

Extended .github/workflows/cd.yml to support VS template releases:

  • Added vstemplate input parameter for controlling VS template releases
  • Implemented RC template release with [email protected] tag
  • Added stable VS template release using version from templates/package.json
  • Updated version sync script to handle VS_RELEASE environment variable

Code Quality

Fixed parameter naming inconsistency:

  • Renamed prefex parameter to prefix in getTemplateZipUrlByVersion() function
  • Updated corresponding test cases for consistency

Template URL Generation Examples

For a C# template in VS 17.14:

// Alpha/Daily version (development)
getTemplateUrl("csharp", getLatestVersion, Platform.VS); 
// Returns: undefined (uses local templates)

// Preview version (RC)
process.env.TEAMSFX_TEMPLATE_PRERELEASE = "vs";
getTemplateUrl("csharp", getLatestVersion, Platform.VS);
// Returns: "https://github.com/OfficeDev/microsoft-365-agents-toolkit/releases/download/[email protected]/csharp.zip"

// Stable version (production)
getTemplateUrl("csharp", getLatestVersion, Platform.VS);
// Returns: "https://github.com/OfficeDev/microsoft-365-agents-toolkit/releases/download/[email protected]/csharp.zip"

This hotfix cherry-picks changes from PRs #14122, #14123, and #14126 to provide VS 17.14 with the ability to download templates from GitHub releases, improving the user experience by ensuring templates are always up-to-date.

Fixes #14407.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • googlechromelabs.github.io
  • https://storage.googleapis.com/chrome-for-testing-public/129.0.6668.70/linux64/chrome-linux64.zip
    • Triggering command: REDACTED, pid is -1 (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Alive-Fish
Copy link
Contributor

@copilot let the branch based on branch release/VS1714P7

@Alive-Fish Alive-Fish closed this Aug 11, 2025
@Copilot Copilot AI changed the title [WIP] [Servicing Hotfix] let VS 17.14 can use online templates [Servicing Hotfix] Enable VS 17.14 to use online templates Aug 11, 2025
Copilot finished work on behalf of Alive-Fish August 11, 2025 03:26
@Copilot Copilot AI requested a review from Alive-Fish August 11, 2025 03:26
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.

[Servicing Hotfix] let VS 17.14 can use online templates
2 participants