Skip to content

feat(vscode): add .NET 10 support for custom code projects#8895

Merged
ccastrotrejo merged 13 commits intomainfrom
ccastrotrejo/NET10
Mar 11, 2026
Merged

feat(vscode): add .NET 10 support for custom code projects#8895
ccastrotrejo merged 13 commits intomainfrom
ccastrotrejo/NET10

Conversation

@ccastrotrejo
Copy link
Contributor

@ccastrotrejo ccastrotrejo commented Mar 6, 2026

Commit Type

  • feature - New functionality

Risk Level

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

What & Why

Adds full .NET 10 support for custom code projects in the VS Code extension. .NET 10 uses the isolated worker model, which requires different project templates, updated packages, and a Program.cs entry point — unlike .NET 8 which used a lighter in-process-compatible approach.

Key Changes

Template Updates

  • Updated FunctionsProjNet10 with correct .NET 10 isolated worker packages (Microsoft.Azure.Functions.Worker v2.51.0, AspNetCore, ApplicationInsights, Workflows.Webjobs.Sdk v1.4.0)
  • Added MSBuild workaround targets (EnsureOutputDirectory, CopyToNet472Folder, TriggerPublishOnBuild)
  • Created ProgramFileNet10 template for the required Program.cs host entry point
  • Renamed FunctionsProjNet8NewFunctionsProjNet8 and FunctionsProjNet10NewFunctionsProjNet10 (cleanup)
  • Deleted unused legacy FunctionsProjNet8 template

TFM Update

  • Changed TargetFramework.Net10 from net10 to net10.0 (correct .NET TFM format)
  • Updated all references across source, tests, and UI components

Scaffolding

  • Updated CreateFunctionAppFiles.ts and FunctionAppFilesStep.ts to generate Program.cs for .NET 10 custom code projects (not for .NET 8, NetFx, or rulesEngine)
  • Program.cs sets up the HostBuilder with ConfigureFunctionsWebApplication() and Application Insights telemetry

Prior commits on this branch

  • Added .NET 10 to TargetFramework enum and project creation flows
  • Mapped net10.0 dotnetJsonCli to net8.0 binaries (forward-compatible)
  • Deduplicated usesPublishFolderProperty utility
  • Added comprehensive test coverage across all changed files

Impact of Change

  • Users: Users can now create .NET 10 custom code projects from the VS Code extension with the correct isolated worker model setup
  • Developers: TargetFramework.Net10 enum value changed from net10 to net10.0 — any downstream consumers should be aware
  • System: New Program.cs generation for .NET 10 only; .NET 8 and NetFx paths unchanged

Test Plan

  • Unit tests added/updated
  • E2E tests added/updated
  • Manual testing completed
  • Tested in: 687+ unit tests passing across vs-code-designer, 8 new Program.cs tests covering creation, namespace replacement, and skip logic for Net8/NetFx/rulesEngine

Contributors

Screenshots/Videos

Copilot AI review requested due to automatic review settings March 6, 2026 21:21
@github-actions
Copy link

github-actions bot commented Mar 6, 2026

📊 Coverage Check

The following changed files need attention:

⚠️ apps/vs-code-designer/src/app/commands/createCustomCodeFunction/createCustomCodeFunctionSteps/functionFileStep.ts - 20% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateFunctionAppFiles.ts - 50% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/functionAppFilesStep.ts - 66% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/createWorkflow/createCodefulWorkflow/createCodefulWorkflowSteps/codefulWorkflowCreateStep.ts - 10% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/commands/workflows/switchToDotnetProject.ts - 70% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/codeless/updateBuildFile.ts - 56% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/debug.ts - 60% covered (needs improvement)
⚠️ apps/vs-code-designer/src/app/utils/dotnet/dotnet.ts - 17% covered (needs improvement)
⚠️ apps/vs-code-react/src/app/createWorkspace/steps/dotNetFrameworkStep.tsx - 77% covered (needs improvement)

Please add tests for the uncovered files before merging.

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

Adds .NET 10 as a supported target framework for Logic Apps custom code projects in the VS Code extension (creation templates, detection, and debugging), alongside existing .NET 8 and .NET Framework support.

Changes:

  • Introduces .NET 10 framework option in both extension quick-pick flows and the VS Code React webview UI (incl. new localized strings).
  • Adds new .NET 10 custom code project templates and updates template/framework mappings & detection logic.
  • Updates debug/runtime handling and dotnet version detection to prioritize .NET 10.

Reviewed changes

Copilot reviewed 24 out of 27 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
libs/vscode-extension/src/lib/models/workflow.ts Adds TargetFramework.Net10 constant for shared model usage.
apps/vs-code-react/src/intl/messages.ts Adds .NET 10 UI strings for framework selection + description.
apps/vs-code-react/src/app/createWorkspace/steps/reviewCreateStep.tsx Refactors path building and maps framework display values to localized strings (incl. net10).
apps/vs-code-react/src/app/createWorkspace/steps/dotNetFrameworkStep.tsx Adds .NET 10 option to the framework dropdown and consolidates option rendering.
apps/vs-code-react/src/app/createWorkspace/steps/test/reviewCreateStep.test.tsx Adds unit test coverage for net10 display in review step.
apps/vs-code-designer/src/constants.ts Adds DotnetVersion.net10 = 'net10.0'.
apps/vs-code-designer/src/assets/backupTemplates/dotnet/~4/net10.0/project.nupkg Adds net10.0 backup template package for fallback scenarios.
apps/vs-code-designer/src/assets/FunctionProjectTemplate/FunctionsProjNet10New New .NET 10 custom code project template.
apps/vs-code-designer/src/assets/FunctionProjectTemplate/FunctionsFileNet10 New .NET 10 function file template.
apps/vs-code-designer/src/app/utils/dotnet/executeDotnetTemplateCommand.ts Updates dotnet version detection priority and refactors command execution logic.
apps/vs-code-designer/src/app/utils/dotnet/dotnet.ts Defaults Functions v4 template key to net10.0.
apps/vs-code-designer/src/app/utils/dotnet/test/executeDotnetTemplateCommand.test.ts Updates tests for new .NET 10 version priority behavior.
apps/vs-code-designer/src/app/utils/debug.ts Adds getCustomCodeRuntime() helper and uses it in debug config creation.
apps/vs-code-designer/src/app/utils/customCodeUtils.ts Centralizes target framework detection (net10/net8/netfx) and updates metadata extraction logic.
apps/vs-code-designer/src/app/utils/codeless/updateBuildFile.ts Updates Microsoft.NET.Sdk.Functions version mapping for net10 (and currently affects net6 behavior).
apps/vs-code-designer/src/app/utils/test/debug.test.ts Adds debug config unit test for net10 custom code.
apps/vs-code-designer/src/app/utils/test/customCodeUtils.test.ts Adds net10 custom code detection/metadata tests based on the new template.
apps/vs-code-designer/src/app/commands/createWorkflow/createCodefulWorkflow/createCodefulWorkflowSteps/codefulWorkflowCreateStep.ts Switches codeful workflow creation default from .NET 8 to .NET 10.
apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/targetFrameworkStep.ts Adds .NET 10 to framework quick pick.
apps/vs-code-designer/src/app/commands/createProject/createCustomCodeProjectSteps/functionAppFilesStep.ts Adds net10 template mappings + uses shared runtime helper.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/test/CreateLogicAppVSCodeContents.test.ts Adds net10 tests for settings/launch generation.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/test/CreateLogicAppProject.test.ts Updates integration tests to include net10 templates/mappings.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateLogicAppVSCodeContents.ts Refactors settings/launch insertion logic and uses shared runtime helper.
apps/vs-code-designer/src/app/commands/createNewCodeProject/CodeProjectBase/CreateFunctionAppFiles.ts Adds net10 templates and shared runtime helper usage.
apps/vs-code-designer/src/app/commands/createCustomCodeFunction/createCustomCodeFunctionSteps/functionFileStep.ts Adds net10 function template selection.
Localize/lang/strings.json Adds .NET 10 strings and other related UI text entries.

@github-actions
Copy link

github-actions bot commented Mar 6, 2026

🤖 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): add .NET 10 support for custom code projects
  • Issue: None — title is concise, follows conventional commit style and clearly describes the change surface (vscode + .NET 10 support for custom code projects).
  • Recommendation: Keep as-is.

Commit Type

  • Properly selected (feature) and only one box checked in the PR body.
  • Note: The commit history contains a mix of feat/refactor/fix commits that align with the body description. No change required.

Risk Level

  • The PR body marks Medium and there is a risk:medium label on the PR — these match.
  • Assessment: The breadth of changes (37 files, templates, behavior change to prefer .NET 10, altered defaults for some flows) justifies Medium risk. Good selection.

What & Why

  • Current: Adds full .NET 10 support including templates, Program.cs generation, TFM updates (net10.0), scaffolding, mapping to json-cli assets, and tests. The PR body contains a clear What & Why and a Key Changes list.
  • Issue: None obvious — the body provides a clear, succinct rationale and lists the major code changes.
  • Recommendation: None required; this is well-written.

Impact of Change

  • The PR body describes Users, Developers, and System impact.
  • Recommendation: Consider calling out additional operational items explicitly if applicable (e.g., CI or release-note requirements, or consequences for consumers of the TargetFramework enum if external packages rely on the old string). Example suggestion to add to the body if relevant: "Note: update any downstream consumers that serialize/deserialize TargetFramework.Net10 if they expect the old token net10." If there are release notes or migration guidance required, add them here.

Test Plan

  • The PR body marks Unit tests added/updated and the diff contains many new/updated unit tests across dotnet, debug, function files, react UI tests, etc. I verified multiple test files were added/updated for the NET10 behavior.
  • E2E tests are not added; manual testing is not selected. This is acceptable if unit tests sufficiently cover behavior and you have a plan for integration/e2e later.
  • Recommendation: If integration tests / E2E will be added later, state that in the Test Plan (e.g., "E2E tests will be added in follow-up PR"), or add a short note why E2E was not added (e.g., reliance on external dotnet SDK or long runtime requirements). This helps reviewers understand test coverage gaps.

⚠️ Contributors

  • Current: Blank in the Contributors section of the PR body.
  • Issue: The commit history includes co-authors and a named author (ccastrotrejo) and Co-authored-by: Copilot lines in commits. The PR body left the Contributors section empty.
  • Recommendation: Add contributor names (e.g., @ccastrotrejo and any others who contributed, and indicate Co-authored-by references if desired) so contributions are visible in the PR description. This is optional but recommended for attribution.

⚠️ Screenshots/Videos

  • Current: N/A - No visual changes stated.
  • Assessment: Correct — changes are non-visual.
  • Recommendation: No action required.

Summary Table

Section Status Recommendation
Title Keep as-is.
Commit Type No change.
Risk Level Risk label matches PR body (Medium).
What & Why Well described.
Impact of Change Consider adding explicit migration/release-note guidance if applicable.
Test Plan Unit tests present. If E2E coverage is required later, add a note.
Contributors ⚠️ Add contributors/co-authors to the PR body for attribution.
Screenshots/Videos ⚠️ No visual changes — N/A is fine.

Final notes / actionable items:

  • The PR overall meets the required PR body template and is comprehensive. It passes the PR title/body checks.
  • A few optional clarifications you may choose to add to the PR body before merging:
    • Contributors: add the author and co-authors (e.g., @ccastrotrejo and other contributors shown in commits) into the Contributors section to make attribution explicit.
    • Tests: you added many unit tests — if there are plans for E2E or integration tests (especially around dotnet detection, global.json creation, and template behavior on CI agents), add a short note in Test Plan describing next steps. If you intentionally skipped E2E because of environmental constraints, add a short justification.
    • Impact/Migration: because default behavior in some flows was changed to prefer .NET 10 (for example, switchToDotnetProject default major version changed to '10' and codeful workflows now pick net10), consider adding a brief migration/release note for consumers who may rely on older defaults. If any pipelines or docs should be updated, call that out.
  • Security/operational check: mapping net10.0 to the net8.0 dotnetJsonCli assets is explained in the PR; ensure CI and release packaging confirm the copied/renamed assets are correct and that no runtime assumptions were missed.

Please update the PR body with the optional clarifications above if helpful, then re-submit. Thank you for the thorough PR and tests — this is a strong change set.


Last updated: Wed, 11 Mar 2026 19:36:02 GMT

@ccastrotrejo ccastrotrejo changed the title feat(vscode): add .NET 10 support for custom code projects feat(vscode): add .NET 10 support for custom code projects [Do not merge yet] Mar 6, 2026
ccastrotrejo and others added 2 commits March 6, 2026 16:58
Add .NET 10 as a selectable target framework across the VS Code extension
and webview for custom code project creation, detection, and debugging.

- Add TargetFramework.Net10 enum value and DotnetVersion.net10 constant
- Create FunctionsFileNet10 and FunctionsProjNet10New template files
- Add net10.0 backup templates for dotnet template fallback
- Expose .NET 10 in extension quick-pick and webview dropdown selectors
- Add DOTNET_10 and DOTNET_10_DESCRIPTION localization strings
- Wire Net10 into template mappings in functionAppFilesStep and
  CreateFunctionAppFiles with shared usesPublishFolderProperty helper
- Extract getCustomCodeRuntime helper for coreclr/clr runtime selection
- Add isCustomCodeNet10Csproj detection and getCustomCodeTargetFramework
  dispatcher in customCodeUtils with usesLogicAppFolderToPublish helper
- Reprioritize .NET version detection to prefer 10 over 8
- Update codeful workflow creation to default to .NET 10
- Add DotnetVersion.net10 to SDK version mapping in updateBuildFile
- Add unit tests for debug config, custom code detection, VSCode contents
  generation, framework version probing, and review step rendering

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Restore original .NET 8 test cases in executeDotnetTemplateCommand tests
  that were incorrectly replaced instead of supplemented with .NET 10 cases
- Add .NET 10 binaries test case alongside existing .NET 8 one
- Fix runtime import for ProjectType/ProjectLanguage/latestGAVersion in
  CreateLogicAppVSCodeContents.ts (was incorrectly collapsed to type-only)
- Restore .NET 6 SDK version mapping to 4.1.3 in updateBuildFile.ts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ccastrotrejo ccastrotrejo added the risk:medium Medium risk change with potential impact label Mar 6, 2026
- Copy dotnetJsonCli/net8.0 to dotnetJsonCli/net10.0 so template
  operations work when getFramework returns net10.0
- Restore value imports for ProjectType, ProjectLanguage, latestGAVersion
  in CreateLogicAppVSCodeContents.ts (biome useImportType kept collapsing
  them to type-only imports which breaks runtime)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…icating assets

Remove the duplicated dotnetJsonCli/net10.0 folder and add a
getJsonCliFramework() mapper that falls back to net8.0 for
unsupported frameworks. The JsonCli DLLs are framework-agnostic
and forward-compatible, so net10.0 can reuse net8.0 binaries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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

Copilot reviewed 25 out of 27 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

apps/vs-code-designer/src/app/utils/debug.ts:29

  • The doc comment for customCodeTargetFramework still says it's limited to ".NET 8 or .NET Framework", but the implementation now supports .NET 10 as well. Please update the comment to reflect the expanded set of supported frameworks.
/**
 * Generates a debug configuration for a Logic App based on the function version and optional custom code framework.
 * @param version - The Azure Functions runtime version (v1, v2, v3, or v4)
 * @param logicAppName - The name of the Logic App to debug
 * @param customCodeTargetFramework - Optional target framework for custom code (.NET 8 or .NET Framework)
 *

ccastrotrejo and others added 2 commits March 6, 2026 17:34
- Add explicit getCustomCodeRuntime tests for Net8, Net10, and NetFx
- Add updateFunctionsSDKVersion tests for .NET 8 (4.5.0) and .NET 10 (4.5.0)
- Export getJsonCliFramework and add tests for framework-to-asset mapping
  including net10.0 → net8.0 fallback behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…l SDK version

- Extract usesPublishFolderProperty into shared debug.ts utility, removing
  duplicated private methods from CreateFunctionAppFiles and FunctionAppFilesStep
- Guard against null getLocalDotNetVersionFromBinaries result in
  switchToDotnetProject to prevent writing invalid global.json; log a
  warning when SDK version cannot be determined
- Add unit tests for usesPublishFolderProperty covering all project types
  and target frameworks

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ccastrotrejo and others added 2 commits March 9, 2026 10:13
Add unit tests for the NET10 branch changes in files that had 0% coverage:
- functionFileStep: Net10 template mapping
- functionAppFilesStep: Net10 cs/csproj template mappings
- targetFrameworkStep: Net10 picker option and shouldPrompt logic
- dotnet.ts: FuncVersion.v4 defaults to net10.0
- dotNetFrameworkStep: Net10 dropdown rendering, selection dispatch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ccastrotrejo and others added 2 commits March 11, 2026 10:57
- Update FunctionsProjNet10 with correct .NET 10 packages and build targets
- Change TFM from net10 to net10.0 across codebase
- Rename FunctionsProjNet8New → FunctionsProjNet8
- Rename FunctionsProjNet10New → FunctionsProjNet10
- Delete unused legacy FunctionsProjNet8 template
- Update TargetFramework.Net10 enum to 'net10.0'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ccastrotrejo ccastrotrejo changed the title feat(vscode): add .NET 10 support for custom code projects [Do not merge yet] feat(vscode): add .NET 10 support for custom code projects Mar 11, 2026
…odel

- Create ProgramFileNet10 template with namespace placeholder
- Update CreateFunctionAppFiles and FunctionAppFilesStep to generate
  Program.cs for .NET 10 custom code projects
- Add 8 tests covering Program.cs creation, namespace replacement,
  and skipping for Net8/NetFx/rulesEngine projects

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ccastrotrejo ccastrotrejo changed the title feat(vscode): add .NET 10 support for custom code projects feat(vscode): add .NET 10 support for custom code projects Mar 11, 2026
- Extract duplicated template maps and file-creation methods into
  shared functionProjectFiles.ts utility module
- Replace hardcoded framework strings with TargetFramework constants
  in dotNetFrameworkStep and reviewCreateStep
- Remove brittle (step as any) casts in tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Azure Azure deleted a comment from github-actions bot Mar 11, 2026
@ccastrotrejo ccastrotrejo enabled auto-merge (squash) March 11, 2026 16:07
@ccastrotrejo ccastrotrejo disabled auto-merge March 11, 2026 18:55
…ework

Version sources were concatenated with no delimiter, causing the
multiline regex to miss versions when outputs lacked trailing newlines.
For example, '8.0.100' + '10.0.200 [/sdk]' became '8.0.10010.0.200'
which matched neither version.

Using join('\n') ensures each source starts on its own line so the

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ccastrotrejo ccastrotrejo enabled auto-merge (squash) March 11, 2026 19:34
@ccastrotrejo ccastrotrejo merged commit 3059380 into main Mar 11, 2026
13 checks passed
@ccastrotrejo ccastrotrejo deleted the ccastrotrejo/NET10 branch March 11, 2026 19:46
path.join(assetsFolderName, 'dotnetJsonCli', jsonCliFramework, 'Microsoft.TemplateEngine.JsonCli.dll')
);

return await executeCommand(
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the await removed from here?

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

Labels

pr-validated risk:medium Medium risk change with potential impact

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants