diff --git a/VSLauncherX/MainDialog.cs b/VSLauncherX/MainDialog.cs index b93abfb..ce8cef0 100644 --- a/VSLauncherX/MainDialog.cs +++ b/VSLauncherX/MainDialog.cs @@ -449,7 +449,14 @@ private void SetupTaskbarTasks() { var cat = new JumpListCustomCategory("Test"); // Create a jump list. - this.TaskbarJumpList = JumpList.CreateJumpList(); + try + { + this.TaskbarJumpList = JumpList.CreateJumpList(); + } + catch (System.Exception ex) + { + + } RebuildTaskbarItems(); } @@ -488,11 +495,13 @@ private void AddItemToTaskbar(VsItem item) /// private void RebuildTaskbarItems(VsFolder? folder = null) { - if (folder is null) + if (this.TaskbarJumpList is null) { - folder = this.solutionGroups; + return; } + folder ??= this.solutionGroups; + // iterate through all items in SolutionItems and add the favorite items to the taskbar foreach (VsItem item in folder.Items) { diff --git a/VSLauncherX/VSLauncherX.csproj b/VSLauncherX/VSLauncherX.csproj index 125567d..fdfd5ce 100644 --- a/VSLauncherX/VSLauncherX.csproj +++ b/VSLauncherX/VSLauncherX.csproj @@ -53,7 +53,7 @@ - +