[PR #11326] [MERGED] Show only latest VS, VC prompts by default #28498

Open
opened 2026-01-31 09:28:56 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11326
Author: @heaths
Created: 9/24/2021
Status: Merged
Merged: 9/29/2021
Merged by: @undefined

Base: mainHead: issue11307


📝 Commits (7)

  • 50822aa Only show latest VS prompts by default
  • 0b65328 Fix crash on shutdown with explicit move constructor
  • fbd581d Resolve PR feedback
  • b0ebd04 Refactor profile generators
  • a134732 Add Visual C++ profile generator
  • ab1ed43 Resolve spelling and formatting issues
  • d926595 Remove TODO and unnecessary, related condition

📊 Changes

17 files changed (+372 additions, -123 deletions)

View changed files

📝 .github/actions/spelling/allow/microsoft.txt (+1 -0)
📝 .github/actions/spelling/patterns/patterns.txt (+1 -0)
src/cascadia/TerminalSettingsModel/BaseVisualStudioGenerator.cpp (+0 -36)
src/cascadia/TerminalSettingsModel/BaseVisualStudioGenerator.h (+0 -35)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+2 -4)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj (+5 -4)
📝 src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj.filters (+9 -3)
src/cascadia/TerminalSettingsModel/VcDevCmdGenerator.cpp (+94 -0)
src/cascadia/TerminalSettingsModel/VcDevCmdGenerator.h (+40 -0)
src/cascadia/TerminalSettingsModel/VisualStudioGenerator.cpp (+36 -0)
src/cascadia/TerminalSettingsModel/VisualStudioGenerator.h (+38 -0)
📝 src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp (+29 -1)
📝 src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.h (+12 -11)
📝 src/cascadia/TerminalSettingsModel/VsDevShellGenerator.cpp (+35 -1)
📝 src/cascadia/TerminalSettingsModel/VsDevShellGenerator.h (+12 -11)
📝 src/cascadia/TerminalSettingsModel/VsSetupConfiguration.cpp (+20 -0)
📝 src/cascadia/TerminalSettingsModel/VsSetupConfiguration.h (+38 -17)

📄 Description

Summary of the Pull Request

Similar to vswhere -latest, show only the latest Visual Studio command prompts / developer PowerShell. This was tested by deleting the local package state and testing against fresh state with both VS2019 and VS2022 Preview installed, and indeed VS2022 Preview (both cmd and powershell) show. The other profiles were generated but hidden by default.

References

Modification of PR #7774

PR Checklist

  • Closes exit command failure (#11307)
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Documentation updated. If checked, please file a pull request on our docs repo and link it here: #xxx
  • Schema updated.
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

The sort algorithm is the same basic algorithm I used in https://github.com/microsoft/vswhere. It sorts first by installation version with a secondary sort based on the install date in case the installation versions are the same.

Validation Steps Performed

With both VS2019 and VS2022 Preview installed, I made sure the initial state was expected, and tried different combinations of hiding and unhiding generated entries, and restarted Terminal to make sure my settings "stuck".


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/11326 **Author:** [@heaths](https://github.com/heaths) **Created:** 9/24/2021 **Status:** ✅ Merged **Merged:** 9/29/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `issue11307` --- ### 📝 Commits (7) - [`50822aa`](https://github.com/microsoft/terminal/commit/50822aaf4f9564910d35550f06631714f40db21f) Only show latest VS prompts by default - [`0b65328`](https://github.com/microsoft/terminal/commit/0b6532815aff57621264273361dba9d0058d2622) Fix crash on shutdown with explicit move constructor - [`fbd581d`](https://github.com/microsoft/terminal/commit/fbd581dd67daff0351d2b424a65fc9f0509711cb) Resolve PR feedback - [`b0ebd04`](https://github.com/microsoft/terminal/commit/b0ebd045a71184dd4930976fadf107f93a856ae8) Refactor profile generators - [`a134732`](https://github.com/microsoft/terminal/commit/a13473268dab8f84ae4fac1f820c7241f6c61769) Add Visual C++ profile generator - [`ab1ed43`](https://github.com/microsoft/terminal/commit/ab1ed43c4baa6282400d79742033ee587e7f526a) Resolve spelling and formatting issues - [`d926595`](https://github.com/microsoft/terminal/commit/d92659525abd8f8b91445bc598ee7896c2de13aa) Remove TODO and unnecessary, related condition ### 📊 Changes **17 files changed** (+372 additions, -123 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/allow/microsoft.txt` (+1 -0) 📝 `.github/actions/spelling/patterns/patterns.txt` (+1 -0) ➖ `src/cascadia/TerminalSettingsModel/BaseVisualStudioGenerator.cpp` (+0 -36) ➖ `src/cascadia/TerminalSettingsModel/BaseVisualStudioGenerator.h` (+0 -35) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+2 -4) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj` (+5 -4) 📝 `src/cascadia/TerminalSettingsModel/Microsoft.Terminal.Settings.ModelLib.vcxproj.filters` (+9 -3) ➕ `src/cascadia/TerminalSettingsModel/VcDevCmdGenerator.cpp` (+94 -0) ➕ `src/cascadia/TerminalSettingsModel/VcDevCmdGenerator.h` (+40 -0) ➕ `src/cascadia/TerminalSettingsModel/VisualStudioGenerator.cpp` (+36 -0) ➕ `src/cascadia/TerminalSettingsModel/VisualStudioGenerator.h` (+38 -0) 📝 `src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.cpp` (+29 -1) 📝 `src/cascadia/TerminalSettingsModel/VsDevCmdGenerator.h` (+12 -11) 📝 `src/cascadia/TerminalSettingsModel/VsDevShellGenerator.cpp` (+35 -1) 📝 `src/cascadia/TerminalSettingsModel/VsDevShellGenerator.h` (+12 -11) 📝 `src/cascadia/TerminalSettingsModel/VsSetupConfiguration.cpp` (+20 -0) 📝 `src/cascadia/TerminalSettingsModel/VsSetupConfiguration.h` (+38 -17) </details> ### 📄 Description ## Summary of the Pull Request Similar to `vswhere -latest`, show only the latest Visual Studio command prompts / developer PowerShell. This was tested by deleting the local package state and testing against fresh state with both VS2019 and VS2022 Preview installed, and indeed VS2022 Preview (both cmd and powershell) show. The other profiles were generated but hidden by default. ## References Modification of PR #7774 ## PR Checklist * [x] Closes #11307 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [x] Tests added/passed * [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx * [ ] Schema updated. * [x] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx ## Detailed Description of the Pull Request / Additional comments The sort algorithm is the same basic algorithm I used in https://github.com/microsoft/vswhere. It sorts first by installation version with a secondary sort based on the install date in case the installation versions are the same. ## Validation Steps Performed With both VS2019 and VS2022 Preview installed, I made sure the initial state was expected, and tried different combinations of hiding and unhiding generated entries, and restarted Terminal to make sure my settings "stuck". --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:28:56 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#28498