Slnx.Combine 0.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Slnx.Combine --version 0.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Slnx.Combine --version 0.0.3
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Slnx.Combine&version=0.0.3
                    
nuke :add-package Slnx.Combine --version 0.0.3
                    

slnx-combiner

Slnx.Combine

slnx-combine is a .NET tool that searches a directory and its subdirectories for Visual Studio solution files (.sln and .slnx) and combines their projects into one XML solution (.slnx).

Install

dotnet tool install --global Slnx.Combine --version 0.0.2

Usage

slnx-combine <Output> [TraverseDirectory]
  • Output is the generated solution path. If its extension is not .slnx, the tool changes it to .slnx.
  • TraverseDirectory is the directory searched recursively for .sln and .slnx files. When omitted, the output file's directory is searched.

When installed as a global .NET tool from NuGet:

slnx-combine combined.slnx C:\code\my-repository

When running the project directly:

dotnet run --project src/SlnxCombiner/SlnxCombiner.csproj -- combined.slnx C:\code\my-repository

The output file is excluded from the discovered input solutions, so an existing combined solution can be regenerated in place.

How the combined solution is generated

For every discovered solution, the tool:

  1. Reads all of its projects.
  2. Resolves project paths relative to that input solution.
  3. Rewrites the paths relative to the generated output file.
  4. Places the projects in a solution folder named after the input solution file.

If multiple input solutions have the same filename, their generated folder names receive suffixes such as _1 and _2. A project referenced by more than one solution is emitted only once, directly under the root of the combined solution. Project display names and project type metadata are preserved when present.

For example, combining Api.slnx and Worker.sln, which both reference Shared.csproj, produces a structure similar to:

<Solution>
  
  <Project Path="src/Shared/Shared.csproj" />

  
  <Folder Name="/Api/">
    <Project Path="src/Api/Api.csproj" />
  </Folder>

  
  <Folder Name="/Worker/">
    <Project Path="src/Worker/Worker.csproj" />
  </Folder>
</Solution>

The exact relative paths depend on the locations of the input solutions, projects, and output file.

Build and test

dotnet test slnx-combiner.slnx
Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.6.1 70 8/27/2026
0.6.0 79 8/27/2026
0.0.5 87 8/23/2026
0.0.3 70 8/23/2026

Add --overwrite flag to ensure no unintentional overwrite of existing slnx file. Added version. Better output when combing