Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 29 additions & 20 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,69 @@
# 2.9.0 (2026-11-16)

- ✨ Projects loaded by other extensions will become visible in Solution Explorer and will have their dependencies loaded (if that option is enabled).

# 2.8.0 (2026-10-01)

- ✨ Style updates to match Visual Studio 2026.
- ✨ New option to hide folders that only contain files.

# 2.7.0 (2026-09-06)

- ✨ New option to hide folders that only contain unloaded projects and miscellaneous files.
-
- ✨ New option to hide folders that only contain unloaded projects and miscellaneous files.

# 2.6.1 (2025-08-19)

- 🔧 Dependency updates.
- 🔧 Dependency updates.

# 2.6.0 (2025-08-16)

- ✨ Updated styling to match changes to Visual Studio's Solution Explorer.
- ✨ Updated styling to match changes to Visual Studio's Solution Explorer.

# 2.5.1 (2025-07-29)

- 🐛 Improved error handling when loading or unloading projects fails.
- 🐛 Improved error handling when loading or unloading projects fails.

# 2.5.0 (2023-12-23)

- ✨ Filtering options (load dependencies, use regular expressions, etc.) are now stored on a per-solution basis.
- ✨ The expanded state of nodes in the Project Filter dialog are remembered.
- ✨ Filtering options (load dependencies, use regular expressions, etc.) are now stored on a per-solution basis.
- ✨ The expanded state of nodes in the Project Filter dialog are remembered.

# 2.4.1 (2023-08-14)

- 🐛 When using a Solution Filter (`.slnf`), projects would sometimes be hidden in Solution Explorer after they were loaded (#4).
- 🐛 When using a Solution Filter (`.slnf`), projects would sometimes be hidden in Solution Explorer after they were loaded (#4).

# 2.4.0 (2022-10-22)

- ✨ When the option to expand loaded projects is turned off, the projects and any folders they were in will be collapsed instead.
- ✨ When the option to expand loaded projects is turned off, the projects and any folders they were in will be collapsed instead.

# 2.3.0 (2022-09-10)

- ✨ Added an option to prevent projects being expanded after they are loaded.
- ✨ Added an option to prevent projects being expanded after they are loaded.

# 2.2.0 (2022-06-05)

- ✨ Ensured that shared project dependencies are loaded.
- ✨ Ensured that shared project dependencies are loaded.

# 2.1.0 (2021-12-30)

- 🚤 Improved performance when showing the projects in the solution.
- ✨ Improved text searching when filtering the projects.
- ✨ Added support for using a regular expression to filter the projects.
- 🚤 Improved performance when showing the projects in the solution.
- ✨ Improved text searching when filtering the projects.
- ✨ Added support for using a regular expression to filter the projects.

# 2.0.0 (2021-12-24)

- ✨ Visual Studio 2022 support.
- 📒 Dropped support for VS 2019. The last version that supported VS 2019 can be downloaded [here](https://github.com/reduckted/ProjectFilter/releases/tag/1.1.1).
- ✨ Visual Studio 2022 support.
- 📒 Dropped support for VS 2019. The last version that supported VS 2019 can be downloaded [here](https://github.com/reduckted/ProjectFilter/releases/tag/1.1.1).

# 1.1.1 (2021-03-23)

- 🐛 Ensured the search box is focused when the dialog is opened.
- 🐛 Ensured the search box is focused when the dialog is opened.

# 1.1.0 (2021-03-21)

- 🐛 Project icons were sometimes missing in the tree.
- 🔧 Performance improvements.
- 🐛 Project icons were sometimes missing in the tree.
- 🔧 Performance improvements.

# 1.0.0 (2021-02-25)

- 🎉 Initial release.
- 🎉 Initial release.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<Version>2.8.0</Version>
<Version>2.9.0</Version>
<TargetFramework>net48</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
32 changes: 16 additions & 16 deletions source/ProjectFilter/Commands/FilterProjectsCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected async override Task ExecuteAsync(OleMenuCmdEventArgs e) {
options = await GetOptionsAsync();

if (options is not null) {
await filterService.ApplyAsync(options);
await filterService.ApplyAsync(options, false);
}
}

Expand All @@ -37,6 +37,7 @@ protected async override Task ExecuteAsync(OleMenuCmdEventArgs e) {
IExtensionSettings globalSettings;
ISolutionSettingsManager solutionSettingsManager;
SolutionSettings? solutionSettings;
FilterBehavior behavior;
FilterDialogViewModel vm;
FilterDialog dialog;
bool result;
Expand All @@ -54,19 +55,14 @@ protected async override Task ExecuteAsync(OleMenuCmdEventArgs e) {
solutionSettingsManager = await VS.GetRequiredServiceAsync<ISolutionSettingsManager, ISolutionSettingsManager>();
solutionSettings = await solutionSettingsManager.GetSettingsAsync();

behavior = new FilterBehavior(solutionSettings, globalSettings);

vm = new FilterDialogViewModel(hierarchyFactory, textFilterFactory, solutionSettings?.Nodes) {
// Initialize the settings with the settings that were last
// used for this solution. If this solution hasn't been
// filtered before, then we'll use the global settings.
LoadProjectDependencies = solutionSettings?.LoadProjectDependencies ?? globalSettings.LoadProjectDependencies,
UseRegularExpressions = solutionSettings?.UseRegularExpressions ?? globalSettings.UseRegularExpressions,
ExpandLoadedProjects = solutionSettings?.ExpandLoadedProjects ?? globalSettings.ExpandLoadedProjects,
HideSolutionFoldersWithoutLoadedProjects =
solutionSettings?.HideSolutionFoldersWithoutLoadedProjects ??
globalSettings.HideSolutionFoldersWithoutLoadedProjects,
HideSolutionFoldersWithOnlyFiles =
solutionSettings?.HideSolutionFoldersWithOnlyFiles ??
globalSettings.HideSolutionFoldersWithOnlyFiles
LoadProjectDependencies = behavior.LoadProjectDependencies,
ExpandLoadedProjects = behavior.ExpandLoadedProjects,
HideSolutionFoldersWithoutLoadedProjects = behavior.HideSolutionFoldersWithoutLoadedProjects,
HideSolutionFoldersWithOnlyFiles = behavior.HideSolutionFoldersWithOnlyFiles
};

dialog = new FilterDialog {
Expand All @@ -79,8 +75,8 @@ protected async override Task ExecuteAsync(OleMenuCmdEventArgs e) {
// was cancelled. This saves the user from having to re-apply
// the settings the next time they open the dialog.
solutionSettings = new SolutionSettings {
LoadProjectDependencies = vm.LoadProjectDependencies,
UseRegularExpressions = vm.UseRegularExpressions,
LoadProjectDependencies = vm.LoadProjectDependencies,
ExpandLoadedProjects = vm.ExpandLoadedProjects,
HideSolutionFoldersWithoutLoadedProjects = vm.HideSolutionFoldersWithoutLoadedProjects,
HideSolutionFoldersWithOnlyFiles = vm.HideSolutionFoldersWithOnlyFiles
Expand All @@ -91,8 +87,8 @@ protected async override Task ExecuteAsync(OleMenuCmdEventArgs e) {

// Also save the settings to the global settings so that the same settings
// can be used for solutions that don't have their own settings yet.
globalSettings.LoadProjectDependencies = solutionSettings.LoadProjectDependencies;
globalSettings.UseRegularExpressions = solutionSettings.UseRegularExpressions;
globalSettings.LoadProjectDependencies = solutionSettings.LoadProjectDependencies;
globalSettings.ExpandLoadedProjects = solutionSettings.ExpandLoadedProjects;
globalSettings.HideSolutionFoldersWithoutLoadedProjects =
solutionSettings.HideSolutionFoldersWithoutLoadedProjects ?? false;
Expand All @@ -101,8 +97,12 @@ protected async override Task ExecuteAsync(OleMenuCmdEventArgs e) {

await globalSettings.SaveAsync();

if (result) {
return vm.Result;
if (result && (vm.Result is not null)) {
return new FilterOptions(
vm.Result.ProjectsToLoad,
vm.Result.ProjectsToUnload,
new FilterBehavior(solutionSettings, globalSettings)
);
}

return null;
Expand Down
1 change: 1 addition & 0 deletions source/ProjectFilter/ProjectFilterPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ protected override async Task InitializeAsync(CancellationToken cancellationToke
await FilterProjectsCommand.InitializeAsync(this);

await SolutionLoadObserver.InitializeAsync();
await ProjectLoadObserver.InitializeAsync();

await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken);
_solutionSettingsManager = this.GetService<ISolutionSettingsManager, ISolutionSettingsManager>();
Expand Down
39 changes: 39 additions & 0 deletions source/ProjectFilter/Services/FilterBehavior.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
namespace ProjectFilter.Services;


public class FilterBehavior {

public FilterBehavior(
SolutionSettings? solutionSettings,
IExtensionSettings globalSettings
) {
// Initialize the settings with the settings that were last
// used for this solution. If this solution hasn't been
// filtered before, then we'll use the global settings.

LoadProjectDependencies = solutionSettings?.LoadProjectDependencies ?? globalSettings.LoadProjectDependencies;

ExpandLoadedProjects = solutionSettings?.ExpandLoadedProjects ?? globalSettings.ExpandLoadedProjects;

HideSolutionFoldersWithoutLoadedProjects =
solutionSettings?.HideSolutionFoldersWithoutLoadedProjects ??
globalSettings.HideSolutionFoldersWithoutLoadedProjects;

HideSolutionFoldersWithOnlyFiles =
solutionSettings?.HideSolutionFoldersWithOnlyFiles ??
globalSettings.HideSolutionFoldersWithOnlyFiles;
}


public bool LoadProjectDependencies { get; }


public bool ExpandLoadedProjects { get; }


public bool HideSolutionFoldersWithoutLoadedProjects { get; }


public bool HideSolutionFoldersWithOnlyFiles { get; }

}
21 changes: 3 additions & 18 deletions source/ProjectFilter/Services/FilterOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ public class FilterOptions {
public FilterOptions(
IEnumerable<Guid> projectsToLoad,
IEnumerable<Guid> projectsToUnload,
bool loadProjectDependencies,
bool expandLoadedProjects,
bool hideSolutionFoldersWithoutLoadedProjects,
bool hideSolutionFoldersWithOnlyFiles
FilterBehavior behavior
) {
ProjectsToLoad = [.. projectsToLoad];
ProjectsToUnload = [.. projectsToUnload];
LoadProjectDependencies = loadProjectDependencies;
ExpandLoadedProjects = expandLoadedProjects;
HideSolutionFoldersWithoutLoadedProjects = hideSolutionFoldersWithoutLoadedProjects;
HideSolutionFoldersWithOnlyFiles = hideSolutionFoldersWithOnlyFiles;
Behavior = behavior;
}


Expand All @@ -30,15 +24,6 @@ bool hideSolutionFoldersWithOnlyFiles
public IReadOnlyCollection<Guid> ProjectsToUnload { get; }


public bool LoadProjectDependencies { get; }


public bool ExpandLoadedProjects { get; }


public bool HideSolutionFoldersWithoutLoadedProjects { get; }


public bool HideSolutionFoldersWithOnlyFiles { get; }
public FilterBehavior Behavior { get; }

}
Loading