dotnet-sln-sync 2.0.0

dotnet tool install --global dotnet-sln-sync --version 2.0.0
                    
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 dotnet-sln-sync --version 2.0.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-sln-sync&version=2.0.0
                    
nuke :add-package dotnet-sln-sync --version 2.0.0
                    

<img src="Icon.png" height="100px" />

VS Solution Syncing: dotnet slnsync

Use this .NET Tool to manually sync .sln and .slnx solution files.

NuGet package

Installation

Download as a global tool via NuGet

dotnet tool install -g dotnet-sln-sync

Usage

The tool will be available to use as dotnet slnsync.

dotnet slnsync [<DIRECTORY>] [--diff-only]
dotnet slnsync <FILE_OR_DIR> <FILE_OR_DIR> [--diff-only]

The tool will prompt you to add or remove the projects/solution folders from the solution files, one by one.

image

After execution, both files should have the same projects and solution folders.

image

When working with teams, it might be useful to create a git hook that calls this tool on commit, or before pushing to ensure no discrepancies exist between the files.

echo "#!/bin/sh" >> .git/hooks/pre-commit
echo slnxsync >> .git/hooks/pre-commit

Contributing

This is an experimental tool, but feel free to create new issues or pull requests.

Dependencies

This project uses vs-solutionpersistence for sln(x) parsing.

Product 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 was computed.  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 was computed.  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
2.0.0 160 4/30/2025
2.0.0-preview 134 4/30/2025
0.1.0 208 3/10/2025
0.0.6 138 12/13/2024
0.0.4 112 12/6/2024
0.0.3 109 12/6/2024
0.0.1 116 12/6/2024