fix(vscode): preserve platform so .NET Framework shows in custom-code dropdown#9366
Merged
lambrianmsft merged 2 commits intoJul 3, 2026
Conversation
Contributor
🤖 AI PR Validation ReportPR Review ResultsThank you for your submission! Here's detailed feedback on your PR title and body compliance:✅ PR Title
✅ Commit Type
✅ Risk Level
✅ What & Why
✅ Impact of Change
✅ Test Plan
✅ Contributors
|
| Section | Status | Recommendation |
|---|---|---|
| Title | ✅ | No change needed |
| Commit Type | ✅ | No change needed |
| Risk Level | ✅ | No change needed |
| What & Why | ✅ | No change needed |
| Impact of Change | ✅ | No change needed |
| Test Plan | ✅ | No change needed |
| Contributors | ✅ | No change needed |
| Screenshots/Videos | Optional, but a screenshot would help for this UI change |
Overall: this PR passes review for title/body compliance. The advised risk level is consistent with the submitter’s low assessment.
Last updated: Fri, 03 Jul 2026 04:39:17 GMT
… dropdown The custom-code ".NET Version" dropdown (DotNetFrameworkStep) hid the Windows-only .NET Framework (net472) option because redux createWorkspace.platform ended up null in both the createWorkspace and createProject webview wizards. Two bugs, both in createWorkspaceSlice.ts: - createWorkspace flow: initializeWorkspace set platform, but the flow wrappers' mount-time resetState(undefined) wiped it back to null. Fix: resetState now always preserves the host-environment values platform and separator, regardless of preserveLogicAppData. - createProject flow: the webview dispatches only initializeProject, which never read platform/separator from its payload, so platform stayed null. Fix: initializeProject now also captures platform and separator (the host already sends them in initialize_frame). Adds reducer-level tests (createWorkspaceSlice.test.ts) locking the preservation behavior and positive Windows sequences for both flows, and strengthens dotNetFrameworkStep.test.tsx to assert the exact per-platform option set (win32 -> Framework/8/10; others -> 8/10). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
f171411 to
df1a8b7
Compare
rllyy97
approved these changes
Jul 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit Type
Risk Level
What & Why
TL;DR: On Windows, the custom-code .NET Version dropdown stopped offering the Windows-only .NET Framework (
net472) option in both the createWorkspace and createProject VS Code webview wizards. Only .NET 8 and .NET 10 showed.The option is gated on redux
createWorkspace.platform === 'win32', butplatformended upnull, so the option was hidden. The extension host was already correct — it always sendsplatform: os.platform()andseparatorin theinitialize_framepayload for every create flow. Two reducer bugs dropped that value:initializeWorkspacesetplatform, but the flow wrappers' mount-timeresetState(undefined)wiped it back tonull.initializeProject, which never readplatform/separatorfrom its payload, soplatformstayednull.Fix (both in
createWorkspaceSlice.ts):resetStatenow always preserves the host-environment valuesplatformandseparator(regardless ofpreserveLogicAppData), via a single-mergeObject.assign(state, initialState, preserved).initializeProjectnow also capturesplatformandseparatorfrom its payload.No changes to
webviewCommunication.tsx, the flow wrappers, or the host handler — the createProject and createWorkspace flows are kept separate.Impact of Change
resetStateno longer wipes host-environment fields (platform,separator);initializeProjectnow reads them from its payload. Redux reducer contract clarified and locked by new tests.Test Plan
New
state/__test__/createWorkspaceSlice.test.tslocks the preservation behavior and positive Windows sequences for both flows. StrengtheneddotNetFrameworkStep.test.tsxasserts the exact per-platform option set (win32-> Framework/8/10; darwin/linux/null -> 8/10). All tests pass locally; biome clean.Contributors
Screenshots/Videos
The only user-visible change is the .NET Framework entry reappearing in the .NET Version dropdown on Windows; behavior is covered by the per-platform option-set unit assertions in
dotNetFrameworkStep.test.tsx.