Skip to content

Commit 2b11032

Browse files
committed
feat: Add Recent Projects feature for Visual Studio and VS Code
1 parent 7421c7d commit 2b11032

7 files changed

Lines changed: 1164 additions & 4 deletions

File tree

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Visual Studio Toolbox is a sleek **system tray application** for Windows that he
4444
| 🖥️ **Windows Terminal** | Integrates with your Windows Terminal profiles |
4545
| 🛠️ **VS Installer Integration** | Modify, update, or manage installations directly |
4646
| 📦 **Workload Detection** | View installed workloads for each instance |
47+
| 📂 **Recent Projects** | Quick access to recently opened solutions ⭐ **NEW!** |
4748

4849
### 📝 **VS Code Features****NEW!**
4950

@@ -53,6 +54,7 @@ Visual Studio Toolbox is a sleek **system tray application** for Windows that he
5354
| 📂 **Quick Access** | Open extensions folder, data folder, and installation directory |
5455
| 🪟 **New Window** | Launch new VS Code windows quickly |
5556
| 🎨 **Custom Icons** | Support for custom VS Code icons |
57+
| 📂 **Recent Folders** | Quick access to recently opened folders ⭐ **NEW!** |
5658

5759
---
5860

@@ -110,6 +112,7 @@ dotnet run --project src/CodingWithCalvin.VSToolbox
110112
**Click** the ▶️ play button to launch Visual Studio, or **click** the ⚙️ gear button for more options:
111113

112114
#### 📋 **Visual Studio Menu:**
115+
- 📂 **Recent Projects****NEW!** - Quick access to recently opened solutions
113116
- 📂 **Open Explorer** - Open the VS installation folder
114117
- 💻 **VS CMD Prompt** - Launch Developer Command Prompt
115118
- 🐚 **VS PowerShell** - Launch Developer PowerShell
@@ -124,6 +127,7 @@ dotnet run --project src/CodingWithCalvin.VSToolbox
124127
**Click** the ▶️ play button to launch VS Code, or **click** the ⚙️ gear button for more options:
125128

126129
#### 📋 **VS Code Menu:**
130+
- 📂 **Recent Folders****NEW!** - Quick access to recently opened folders
127131
- 🧩 **Open Extensions Folder** - Browse installed extensions
128132
- 🪟 **Open New Window** - Launch a new VS Code window
129133
- 📂 **Open Installation Folder** - Browse VS Code files
@@ -158,6 +162,7 @@ VSToolbox/
158162
├── 📁 docs/ # 📚 Documentation
159163
│ ├── VSCODE_INTEGRATION.md # VS Code features guide
160164
│ ├── VS_INSTALLER_INTEGRATION.md # VS Installer guide
165+
│ ├── RECENT_PROJECTS.md # Recent Projects feature guide
161166
│ └── VSCODE_ICONS.md # Icon setup guide
162167
163168
├── 📁 scripts/ # 🔧 Helper scripts
@@ -185,6 +190,12 @@ VSToolbox/
185190

186191
### 🎉 **Latest Features**
187192

193+
#### **Recent Projects****NEW!**
194+
- Quick access to recently opened solutions for Visual Studio
195+
- Quick access to recently opened folders for VS Code
196+
- Sorted by last access time
197+
- Click to open directly
198+
188199
#### **VS Code Integration**
189200
- Detects Visual Studio Code and VS Code Insiders
190201
- Shows installed extensions
@@ -201,14 +212,15 @@ VSToolbox/
201212
- Support for multiple VS Code installation locations
202213
- Extension discovery and counting
203214

204-
See [VSCODE_INTEGRATION.md](docs/VSCODE_INTEGRATION.md) and [VS_INSTALLER_INTEGRATION.md](docs/VS_INSTALLER_INTEGRATION.md) for detailed documentation.
215+
See [RECENT_PROJECTS.md](docs/RECENT_PROJECTS.md), [VSCODE_INTEGRATION.md](docs/VSCODE_INTEGRATION.md) and [VS_INSTALLER_INTEGRATION.md](docs/VS_INSTALLER_INTEGRATION.md) for detailed documentation.
205216

206217
---
207218

208219
## 📚 Documentation
209220

210221
- 📖 [VS Code Integration Guide](docs/VSCODE_INTEGRATION.md)
211222
- 🛠️ [Visual Studio Installer Integration](docs/VS_INSTALLER_INTEGRATION.md)
223+
- 📂 [Recent Projects Feature](docs/RECENT_PROJECTS.md)**NEW!**
212224
- 🎨 [VS Code Icons Setup](docs/VSCODE_ICONS.md)
213225
- 📝 [Implementation Details](docs/VS_INSTALLER_IMPLEMENTATION.md)
214226

@@ -279,13 +291,14 @@ This project is licensed under the **MIT License** - see the [LICENSE](LICENSE)
279291

280292
Future enhancements we're considering:
281293

294+
- [x] ~~Recent projects list~~**Implemented!**
282295
- [ ] VS Code workspace detection
283296
- [ ] VS Code extension management
284297
- [ ] More Visual Studio Installer commands
285298
- [ ] Custom launch arguments
286299
- [ ] Keyboard shortcuts
287-
- [ ] Recent projects list
288300
- [ ] Solution file associations
301+
- [ ] Pin favorite projects
289302

290303
---
291304

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
namespace CodingWithCalvin.VSToolbox.Core.Models;
2+
3+
public sealed class RecentProject
4+
{
5+
public required string Name { get; init; }
6+
public required string Path { get; init; }
7+
public required DateTimeOffset LastAccessed { get; init; }
8+
public bool IsSolution => Path.EndsWith(".sln", StringComparison.OrdinalIgnoreCase);
9+
public bool IsFolder => Directory.Exists(Path) && !File.Exists(Path);
10+
11+
public string DisplayName => System.IO.Path.GetFileNameWithoutExtension(Name);
12+
13+
public string ProjectType => Path switch
14+
{
15+
var p when p.EndsWith(".sln", StringComparison.OrdinalIgnoreCase) => "Solution",
16+
var p when p.EndsWith(".csproj", StringComparison.OrdinalIgnoreCase) => "C# Project",
17+
var p when p.EndsWith(".vbproj", StringComparison.OrdinalIgnoreCase) => "VB.NET Project",
18+
var p when p.EndsWith(".fsproj", StringComparison.OrdinalIgnoreCase) => "F# Project",
19+
var p when p.EndsWith(".vcxproj", StringComparison.OrdinalIgnoreCase) => "C++ Project",
20+
var p when Directory.Exists(p) => "Folder",
21+
_ => "Project"
22+
};
23+
24+
public bool Exists => File.Exists(Path) || Directory.Exists(Path);
25+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using CodingWithCalvin.VSToolbox.Core.Models;
2+
3+
namespace CodingWithCalvin.VSToolbox.Core.Services;
4+
5+
public interface IRecentProjectsService
6+
{
7+
IReadOnlyList<RecentProject> GetRecentProjects(VisualStudioInstance instance, int maxCount = 10);
8+
}

0 commit comments

Comments
 (0)