Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tom-englert/SolutionFilterBuilder
Creates a solution filter form a Visual Studio solution based on MSBuild project properties.
https://github.com/tom-englert/SolutionFilterBuilder
Last synced: 5 days ago
JSON representation
Creates a solution filter form a Visual Studio solution based on MSBuild project properties.
- Host: GitHub
- URL: https://github.com/tom-englert/SolutionFilterBuilder
- Owner: tom-englert
- License: mit
- Created: 2023-02-18T13:15:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-01T10:42:50.000Z (12 months ago)
- Last Synced: 2024-05-01T20:39:48.044Z (6 months ago)
- Language: C#
- Size: 30.3 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# SolutionFilterBuilder
## A DotNet tool to create a solution filter form a Visual Studio solution, controlled by MSBuild project properties.
[![Build](https://github.com/tom-englert/SolutionFilterBuilder/actions/workflows/build.yml/badge.svg)](https://github.com/tom-englert/SolutionFilterBuilder/actions/workflows/build.yml)
[![Nuget](https://img.shields.io/nuget/v/SolutionFilterBuilder)](https://www.nuget.org/packages/SolutionFilterBuilder)Easily create a solution filter to avoid loading more than necessary, and update your filter whenever your solution changes.
This tool uses MSBuild logic to control which projects should be part of your filter, giving you a high grade of flexibility.
All projects containing a property `IncludeInSolutionFilter` set to `true` are included in the specified filter, along with all their referenced projects.
A property `SolutionFilterName` is provided to be able to write MSBuild conditions based on the filter name.You can mark individual projects by adding the `IncludeInSolutionFilter` property to the project file:
- Include the project and all references in any filter:
```xml
true
```- Include the project only if the filter name is `Setup.slnf`:
```xml
true
```You can include several projects by convention by adding conditional properties in the Directory.Build.targets file:
- Include all test projects in `Test.slnf`:
```xml
true
```
- Include all projects ending with `Something` in `Something.slnf`:
```xml
<_IsSomeProject>$(MSBuildProjectName.ToUpperInvariant().EndsWith("SOMETHING"))
true
```
- Include all executables in `Apps.slnf`:
```xml
true
```## Installation
```
dotnet tool install solutionfilterbuilder -g
```
## Usage
```
build-slnf [options]
```
#### Options
```
-i, --input The path to the solution file that is the source for the filter.
If no solution is specified, it tries to find a single one in the current directory.
-o, --output (REQUIRED) The name of the solution filter that is created.
An existing file will be overwritten without confirmation.
--version Show version information
-?, -h, --help Show help and usage information
```
#### Sample
Build a solution filter `Test.sln` from the solution in the current directory.
```
build-slnf -o Test
```