Commit 3059380
feat(vscode): add .NET 10 support for custom code projects (#8895)
* feat(vscode): add .NET 10 support for custom code projects
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>
* fix(vscode): restore .NET 8 test coverage and fix import regression
- 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>
* fix(vscode): add dotnetJsonCli net10.0 asset and fix import regression
- 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>
* refactor(vscode): map net10.0 to net8.0 dotnetJsonCli instead of duplicating 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>
* test(vscode): improve coverage for .NET 10 changes
- 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>
* refactor(vscode): deduplicate usesPublishFolderProperty and guard null 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>
* test(vscode): add coverage for .NET 10 changes across 5 uncovered files
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>
* refactor(vscode): update .NET 10 template and rename project templates
- 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>
* feat(vscode): add Program.cs generation for .NET 10 isolated worker model
- 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>
* refactor(vscode): extract shared function project file utilities
- 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>
* fix(vscode): add newline delimiter between version sources in getFramework
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>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 55400fe commit 3059380
File tree
37 files changed
+1559
-395
lines changed- apps
- vs-code-designer/src
- app
- commands
- createCustomCodeFunction/createCustomCodeFunctionSteps
- __test__
- createNewCodeProject/CodeProjectBase
- __test__
- createProject/createCustomCodeProjectSteps
- __test__
- createWorkflow/createCodefulWorkflow/createCodefulWorkflowSteps
- workflows
- utils
- __test__
- codeless
- __test__
- dotnet
- __test__
- assets
- FunctionProjectTemplate
- backupTemplates/dotnet/~4/net10.0
- vs-code-react/src
- app/createWorkspace/steps
- __test__
- intl
- libs/vscode-extension/src/lib/models
37 files changed
+1559
-395
lines changedLines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
Lines changed: 13 additions & 112 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 34 | | |
49 | | - | |
| 35 | + | |
50 | 36 | | |
51 | 37 | | |
52 | 38 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 39 | + | |
57 | 40 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | 41 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 42 | + | |
66 | 43 | | |
67 | | - | |
68 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
69 | 47 | | |
70 | | - | |
71 | 48 | | |
72 | | - | |
| 49 | + | |
73 | 50 | | |
74 | 51 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
| 52 | + | |
79 | 53 | | |
80 | 54 | | |
81 | 55 | | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 56 | | |
156 | 57 | | |
157 | 58 | | |
| |||
232 | 133 | | |
233 | 134 | | |
234 | 135 | | |
235 | | - | |
| 136 | + | |
236 | 137 | | |
237 | 138 | | |
238 | 139 | | |
| |||
244 | 145 | | |
245 | 146 | | |
246 | 147 | | |
247 | | - | |
| 148 | + | |
248 | 149 | | |
249 | 150 | | |
250 | 151 | | |
| |||
Lines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | | - | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
39 | | - | |
40 | | - | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 112 | + | |
| 113 | + | |
116 | 114 | | |
117 | 115 | | |
118 | 116 | | |
| |||
0 commit comments