dotnet-solution-items
0.1.1
dotnet tool install --global dotnet-solution-items --version 0.1.1
dotnet new tool-manifest
dotnet tool install --local dotnet-solution-items --version 0.1.1
#tool dotnet:?package=dotnet-solution-items&version=0.1.1
nuke :add-package dotnet-solution-items --version 0.1.1
dotnet-solution-items
Maintains the generated Solution Items folder in a .slnx file from a semicolon-separated glob list stored in an XML comment.
Quick Start
Install the tool globally, or run it ad hoc with dnx.
dotnet tool install --global dotnet-solution-items
# or
dnx dotnet-solution-items --help
Add globs to a solution:
dotnet-solution-items add "*"
dotnet-solution-items add ".github/workflows/*" "!build.sh"
dotnet-solution-items add "*.md; *.props"
The tool stores the globs in a marker comment and owns the contiguous Folder block immediately below it.
<Folder Name="/Solution Items/">
<File Path=".editorconfig" />
<File Path="README.md" />
</Folder>
Commands
add <glob>adds a glob and updates the generated solution items.remove <glob>removes a glob and updates the generated solution items.listprints configured globs and the files they match.updaterefreshes the generated solution items. If the marker comment is missing, it writes a warning and leaves the solution unchanged.
add and remove accept one or more glob arguments. Each argument may also contain semicolon-separated globs, and both forms are treated the same way.
On the first add, if the solution already has an unmarked Solution Items block, the command fails with a warning because non-matching existing items would be removed. Pass --force to replace that block with the generated one.
Options
--solution <path>points to a specific.slnxfile or to a directory containing exactly one.slnxfile.--limit <n>changes the maximum total generatedFolderandFileelements. The default is100.--forceallowsaddto replace an existing unmarkedSolution Itemsblock when creating the marker comment.
Globs are rooted at the solution directory and match files only. Gitignored files, solution files, and *.csproj files are automatically excluded.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.