Skip to content

Commit d283abb

Browse files
committed
Bump packages and apply new api changes
1 parent f7e7a06 commit d283abb

13 files changed

+26
-131
lines changed

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
</PropertyGroup>
55
<ItemGroup>
6-
<PackageVersion Include="Microsoft.CommandPalette.Extensions" Version="0.2.0" />
7-
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.10" />
8-
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.10" />
6+
<PackageVersion Include="Microsoft.CommandPalette.Extensions" Version="0.6.251022008" />
7+
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.0" />
8+
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
99
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.6901" />
10-
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.8.251003001" />
10+
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.8.251106002" />
1111
<PackageVersion Include="System.Text.Json" Version="9.0.10" />
1212
</ItemGroup>
1313
</Project>

WorkspaceLauncherForVSCode/Classes/WorkspaceStorage.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ private void InitializeDatabase()
9696
var checkCmd = _connection.CreateCommand();
9797
checkCmd.Transaction = transaction;
9898
checkCmd.CommandText = "SELECT count(*) FROM sqlite_master WHERE type='table' AND name='Workspaces'";
99-
var oldTableExists = (long)checkCmd.ExecuteScalar() > 0;
99+
var count = checkCmd.ExecuteScalar() as long? ?? 0L;
100+
var oldTableExists = count > 0;
100101

101102
if (oldTableExists)
102103
{
@@ -133,7 +134,7 @@ public async Task<List<VisualStudioCodeWorkspace>> GetWorkspacesAsync()
133134
{
134135
Path = reader.GetString(0),
135136
Name = reader.IsDBNull(1) ? null : reader.GetString(1),
136-
WorkspaceType = (Enums.WorkspaceType)reader.GetInt32(2),
137+
WorkspaceType = (WorkspaceType)reader.GetInt32(2),
137138
Frequency = reader.GetInt32(3),
138139
LastAccessed = reader.IsDBNull(4) ? DateTime.MinValue : DateTime.Parse(reader.GetString(4), CultureInfo.InvariantCulture),
139140
PinDateTime = reader.IsDBNull(5) ? null : DateTime.Parse(reader.GetString(5), CultureInfo.InvariantCulture),

WorkspaceLauncherForVSCode/Commands/CopyPathCommand.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

WorkspaceLauncherForVSCode/Commands/OpenInExplorerCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT License. See the LICENSE file in the project root for details.
33
using System;
44
using System.IO;
5-
using Microsoft.CmdPal.Ext.System.Helpers;
65
using Microsoft.CommandPalette.Extensions.Toolkit;
76
using WorkspaceLauncherForVSCode.Classes;
87
using WorkspaceLauncherForVSCode.Enums;
@@ -61,7 +60,7 @@ public override CommandResult Invoke()
6160
return pathInvalidResult;
6261
}
6362

64-
OpenInShellHelper.OpenInShell(_path, pathToOpen);
63+
ShellHelpers.OpenInShell(_path, pathToOpen);
6564
return CommandResult.Dismiss();
6665
}
6766
catch (Exception ex)

WorkspaceLauncherForVSCode/Commands/OpenInTerminalCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT License. See the LICENSE file in the project root for details.
33
using System;
44
using System.IO;
5-
using Microsoft.CmdPal.Ext.System.Helpers;
65
using Microsoft.CommandPalette.Extensions.Toolkit;
76
using WorkspaceLauncherForVSCode.Classes;
87
using WorkspaceLauncherForVSCode.Enums;
@@ -59,7 +58,7 @@ public override CommandResult Invoke()
5958
}
6059

6160
var terminal = _settingsManager.TerminalType == TerminalType.PowerShell ? "powershell.exe" : "cmd.exe";
62-
OpenInShellHelper.OpenInShell(terminal, workingDir: directoryPath);
61+
ShellHelpers.OpenInShell(terminal, workingDir: directoryPath);
6362
}
6463

6564
return CommandResult.Dismiss();

WorkspaceLauncherForVSCode/Commands/OpenSolutionCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System;
44
using System.Collections.Generic;
55
using System.Threading.Tasks;
6-
using Microsoft.CmdPal.Ext.System.Helpers;
76
using Microsoft.CommandPalette.Extensions.Toolkit;
87
using WorkspaceLauncherForVSCode.Classes;
98
using WorkspaceLauncherForVSCode.Components;
@@ -111,7 +110,7 @@ public override CommandResult Invoke()
111110

112111
if (Workspace.VSInstance != null)
113112
{
114-
OpenInShellHelper.OpenInShell(Workspace.VSInstance.InstancePath, Workspace.Path, runAs: _elevated ? OpenInShellHelper.ShellRunAsType.Administrator : OpenInShellHelper.ShellRunAsType.None);
113+
ShellHelpers.OpenInShell(Workspace.VSInstance.InstancePath, Workspace.Path, runAs: _elevated ? ShellHelpers.ShellRunAsType.Administrator : ShellHelpers.ShellRunAsType.None);
115114
}
116115

117116
return PageCommandResultHandler.HandleCommandResult(page);

WorkspaceLauncherForVSCode/Commands/OpenVisualStudioCodeCommand.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using System.Diagnostics;
55
using System.IO;
66
using System.Threading.Tasks;
7-
using Microsoft.CmdPal.Ext.System.Helpers;
87
using Microsoft.CommandPalette.Extensions.Toolkit;
98
using WorkspaceLauncherForVSCode.Classes;
109
using WorkspaceLauncherForVSCode.Enums;
@@ -114,7 +113,7 @@ public override CommandResult Invoke()
114113
}
115114
else
116115
{
117-
OpenInShellHelper.OpenInShell(Workspace.VSCodeInstance.ExecutablePath, arguments, runAs: _elevated ? OpenInShellHelper.ShellRunAsType.Administrator : OpenInShellHelper.ShellRunAsType.None);
116+
ShellHelpers.OpenInShell(Workspace.VSCodeInstance.ExecutablePath, arguments, runAs: _elevated ? ShellHelpers.ShellRunAsType.Administrator : ShellHelpers.ShellRunAsType.None);
118117
}
119118

120119
Task.Run(() => page.UpdateFrequencyAsync(Workspace.Path, Workspace.WorkspaceType));

WorkspaceLauncherForVSCode/Helpers/OpenInShellHelper.cs

Lines changed: 0 additions & 56 deletions
This file was deleted.

WorkspaceLauncherForVSCode/Pages/StaticHelpItems.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public static void Initialize(Dependencies deps)
9393
new ListItem(VisualStudioDetailPage)
9494
{
9595
Subtitle = "Visual Studio",
96-
Icon = Icon.VisualStudio,
96+
Icon = Icon.VisualStudio2026,
9797
},
9898
new ListItem(VisualStudioCodeDetailPage)
9999
{

WorkspaceLauncherForVSCode/Pages/VisualStudioDetailPage.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public override IListItem[] GetItems()
6262
{
6363
Title = _countTracker[CountType.VisualStudio].ToString(CultureInfo.InvariantCulture),
6464
Subtitle = "Total",
65-
Icon = Classes.Icon.VisualStudio,
65+
Icon = Classes.Icon.VisualStudio2026,
6666
}
6767
];
6868
}

0 commit comments

Comments
 (0)