Skip to content

feat(vscode): configure custom-code .NET runtimes - #9611

Open
Brian Lam (lambrianmsft) wants to merge 2 commits into
Azure:mainfrom
lambrianmsft:lambrian-microsoft-custom-code-runtime-settings
Open

feat(vscode): configure custom-code .NET runtimes#9611
Brian Lam (lambrianmsft) wants to merge 2 commits into
Azure:mainfrom
lambrianmsft:lambrian-microsoft-custom-code-runtime-settings

Conversation

@lambrianmsft

Copy link
Copy Markdown
Contributor

Commit Type

  • feature - New functionality
  • fix - Bug fix
  • refactor - Code restructuring without behavior change
  • perf - Performance improvement
  • docs - Documentation update
  • test - Test-related changes
  • chore - Maintenance/tooling

Risk Level

  • Low - Minor changes, limited scope
  • Medium - Moderate changes, some user impact
  • High - Major changes, significant user/system impact

Risk rationale: Medium because this changes VS Code extension project creation, the Create Workspace webview, generated project configuration, encrypted local-settings handling, and required E2E CI coverage. The behavior is scoped to custom-code Logic App projects and has focused unit, UI, integration, and E2E coverage.

What & Why

Custom-code Logic App projects now record the associated .NET target in the Logic App root local.settings.json by setting LOGIC_APPS_CUSTOMCODE_DOTNETVERSION to net8 or net10.0. This applies to new workspaces and custom-code projects added to existing Logic Apps, while leaving .NET Framework and non-custom-code projects unchanged.

The setting uses the existing merge path so unrelated values are preserved. If local.settings.json was encrypted before the update, it is re-encrypted after the setting is written.

This change also pins Microsoft.ApplicationInsights.WorkerService to 2.21.0 in the .NET 10 function-project template, keeps .NET 10 hidden from the custom-code Create Workspace picker, and adds focused CI coverage for the .NET 8 runtime lifecycle and the hidden .NET 10 option.

Impact of Change

  • Users: Custom-code Logic Apps created with .NET 8 receive LOGIC_APPS_CUSTOMCODE_DOTNETVERSION=net8. Existing custom-code Logic Apps receive the corresponding setting when custom code is added. .NET 10 remains intentionally unavailable in the Create Workspace picker.
  • Developers: Project creation uses a shared helper to add the custom-code .NET version at the authoritative Logic App project path. Tests cover supported frameworks, no-op cases, encrypted settings, template generation, UI availability, and runtime behavior.
  • System: The .NET 10 project template uses Microsoft.ApplicationInsights.WorkerService version 2.21.0. VS Code E2E CI gains required net8 and net10 matrix legs; net8 validates creation and the debug/run lifecycle, while net10 validates that the picker option remains hidden.

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in:
    • 133 focused VS Code designer unit and integration tests for project creation, settings placement, encryption preservation, and generated project templates.
    • 17 VS Code React tests confirming .NET 8 remains available and .NET 10 is hidden across Windows and non-Windows picker states.
    • VS Code React production build.
    • ExTester TypeScript compilation with npx tsup --config tsup.e2e.test.config.ts.
    • GitHub Actions workflow parsing and matrix/summary-gate validation.
    • CI customcodedotnetonly net8 leg: real wizard creation, fresh-session reopen, setting assertion, debug, healthy runtime, callback invocation, succeeded run history, and custom-code action success.
    • CI customcodedotnetonly net10 leg: real wizard assertion that .NET 10 is absent while .NET 8 remains available.

Contributors

Brian Lam (@lambrianmsft)

Screenshots/Videos

No layout or styling changes. The net10 real-wizard E2E captures and uploads a screenshot proving the option is hidden.

github-actions Bot and others added 2 commits August 26, 2026 22:22
Auto-generated by Graphify after source code changes.

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Add framework-specific custom-code app settings, preserve encrypted local settings, update the net10 template, keep net10 hidden in the wizard, and add focused unit and E2E coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings September 9, 2026 22:51
@lambrianmsft Brian Lam (lambrianmsft) added the risk:medium Medium risk change with potential impact label Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

🤖 AI PR Validation Report

PR Review Results

Thank you for your submission! Here's detailed feedback on your PR title and body compliance:

PR Title

  • Current: feat(vscode): configure custom-code .NET runtimes
  • Issue: None — uses a valid feat prefix with scope and is descriptive.
  • Recommendation: No change needed.

Commit Type

  • Exactly one type is selected (feature/feat - New functionality), which matches the feature work in this PR.
  • Note: The label text reads feature rather than the template's feat, but a single valid selection is present — no action required.

Risk Level

  • The body correctly selects exactly one level (Medium), and that matches my advised estimate. However, the PR has NO risk:* label applied (labels: []). Every PR must carry a risk label that matches the body selection. Add the risk:medium label. Estimate rationale: this ships to the apps/vs-code-designer VS Code extension (project creation, encrypted local-settings handling, template config) — extension-distribution changes are Medium. The added CI E2E job uses standard pull_request triggers with no elevated permissions or governance change, so it does not raise risk to High.

What & Why

  • Current: Clear explanation of the LOGIC_APPS_CUSTOMCODE_DOTNETVERSION setting, merge/encryption behavior, the 2.21.0 pin, and hiding .NET 10.
  • Issue: None.
  • Recommendation: No change needed.

Impact of Change

  • All three audiences (Users, Developers, System) are addressed with specifics.
  • Recommendation:
    • Users: As written — custom-code .NET 8 apps get the setting; .NET 10 stays hidden.
    • Developers: As written — shared helper writes the setting at the authoritative project path.
    • System: As written — template pin 2.21.0, new net8/net10 CI legs.

Test Plan

  • Both unit tests (localSettings, functionProjectFiles, integration) and E2E tests (Phase 4.15A/B) are added/updated and confirmed in the diff.

Contributors


⚠️ Screenshots/Videos

  • The diff touches apps/vs-code-react/src/ (dotNetFrameworkStep.tsx), but the change removes a dropdown option rather than altering layout/styling, and the net10 E2E already captures a screenshot proving the option is hidden. Not blocking — no additional screenshot strictly required, but attaching the captured picker screenshot inline would help reviewers.

Summary Table

Section Status Recommendation
Title No change needed
Commit Type Minor: label reads feature vs feat
Risk Level Add the missing risk:medium label to match the body
What & Why No change needed
Impact of Change No change needed
Test Plan No change needed
Contributors No change needed
Screenshots/Videos ⚠️ Optionally attach the captured net10 picker screenshot

Action required: This PR is blocked only by the missing risk label. Apply risk:medium (it matches both your body selection and the advised estimate) and this review will pass.


Powered by: Copilot CLI (claude-opus-4.8) | Last updated: Wed, 09 Sep 2026 22:52:38 GMT

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Note

Copilot was unable to run its full agentic suite in this review.

Pull request overview

Adds support for recording the custom-code .NET target framework into the Logic App root local.settings.json and extends CI/E2E coverage to validate .NET 8 runtime behavior while keeping .NET 10 hidden in the Create Workspace picker.

Changes:

  • Write LOGIC_APPS_CUSTOMCODE_DOTNETVERSION (net8 / net10.0) to the authoritative Logic App project local.settings.json, preserving merge + encryption behavior.
  • Hide .NET 10 from the VS Code Create Workspace custom-code framework picker and update unit/UI/E2E coverage accordingly.
  • Add a dedicated CI job matrix (net8, net10) and new E2E phases/tests for custom-code .NET version creation/assertion.

Reviewed changes

Copilot reviewed 23 out of 33 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
libs/vscode-extension/src/graphify-out/GRAPH_REPORT.md Updates generated graph report metadata/content after changes.
libs/designer-ui/src/graphify-out/GRAPH_REPORT.md Updates generated graph report metadata/content after changes.
libs/data-mapper-v2/src/graphify-out/GRAPH_REPORT.md Updates generated graph report metadata/content after changes.
libs/chatbot/src/graphify-out/GRAPH_REPORT.md Updates generated graph report metadata/content after changes.
libs/a2a-core/src/graphify-out/GRAPH_REPORT.md Updates generated graph report metadata/content after changes.
apps/vs-code-react/src/app/createWorkspace/steps/dotNetFrameworkStep.tsx Removes .NET 10 option from the framework picker options list.
apps/vs-code-react/src/app/createWorkspace/steps/test/dotNetFrameworkStep.test.tsx Updates React tests to assert .NET 10 is hidden and selection behavior.
apps/vs-code-designer/src/test/ui/runHelpers.ts Exports API-based action-status verifier for action-name-specific assertions.
apps/vs-code-designer/src/test/ui/run-e2e.ts Adds custom-code .NET E2E phases, dotnet override settings, and target sharding.
apps/vs-code-designer/src/test/ui/customCodeDotNetVersionCreate.test.ts New E2E create-phase test (net8 create / net10 hidden assertion).
apps/vs-code-designer/src/test/ui/customCodeDotNetVersionAssert.test.ts New E2E assert-phase test for setting + full debug/run lifecycle evidence.
apps/vs-code-designer/src/test/ui/SKILL.md Documents new E2E phase/mode and operational guidance.
apps/vs-code-designer/src/constants.ts Adds constant for LOGIC_APPS_CUSTOMCODE_DOTNETVERSION setting key.
apps/vs-code-designer/src/assets/FunctionProjectTemplate/FunctionsProjNet10 Pins Microsoft.ApplicationInsights.WorkerService to 2.21.0.
apps/vs-code-designer/src/app/utils/appSettings/localSettings.ts Adds helper to write custom-code .NET version setting; preserves encryption.
apps/vs-code-designer/src/app/utils/appSettings/test/localSettings.test.ts New unit tests covering setting write/merge/no-op/encryption behavior.
apps/vs-code-designer/src/app/utils/test/functionProjectFiles.test.ts New tests verifying net10 template pin and generated csproj content.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/test/CreateLogicAppWorkspaceIntegration.test.ts Integration tests asserting setting written to authoritative Logic App path.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/test/CreateLogicAppProject.test.ts Adds tests asserting setting merge behavior and no-op for NetFx/rulesEngine.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateLogicAppWorkspace.ts Writes custom-code .NET version setting after function project scaffolding.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateLogicAppProjects.ts Writes custom-code .NET version setting for “add project” flow too.
.github/workflows/vscode-e2e.yml Adds vscode-e2e-customcode-dotnet job and gates it in summary.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


- name: Run custom-code .NET version create/assert + debug lifecycle E2E
run: |
export CUSTOMCODE_DOTNET_BINARY_PATH="$(command -v dotnet)"
Comment on lines +2508 to +2511
const systemDotnetRoot = process.env.CUSTOMCODE_DOTNET_ROOT?.trim() || path.dirname(systemDotnetBinary);

process.env.DOTNET_ROOT = systemDotnetRoot;
process.env.PATH = `${systemDotnetRoot}${path.delimiter}${originalPath || ''}`;
Comment on lines +7 to +9
* Drives the REAL Create Workspace webview to create a `Logic app with custom
* code` + Stateful workspace, targeting either `.NET 8` or `.NET 10`, selected
* via `CUSTOMCODE_DOTNET_E2E_VERSION` ('net8' | 'net10', default 'net8').
Comment on lines +79 to +92
* Per-version fixed layout. Byte-for-byte identical to the constants block in
* customCodeDotNetVersionAssert.test.ts — keep the two files' tables in sync.
* Disjoint in BOTH the parent directory and every generated name so the two
* targets can never collide on disk or inside a `.code-workspace`, and so a
* stale directory from a previous local run cannot leak into either target.
*/
const WORKSPACE_PARENT_DIR = path.join(os.tmpdir(), 'la-e2e-test', `customcode-dotnet-${TARGET}-parent`);
const WORKSPACE_NAME = `cc${TARGET}ws`;
const APP_NAME = `cc${TARGET}app`;
const WORKFLOW_NAME = `cc${TARGET}wf`;
const CC_FOLDER_NAME = `cc${TARGET}folder`;
const FN_NAME = `cc${TARGET}fn`;
const FN_NAMESPACE = 'MyCompany.Functions';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-pr-update risk:medium Medium risk change with potential impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants