Use this .NET Tool to manually sync .sln and .slnx solution files.
Download as a global tool via NuGet
dotnet tool install -g dotnet-sln-syncThe 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.
After execution, both files should have the same projects and solution folders.
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-commitThis is an experimental tool, but feel free to create new issues or pull requests.
This project uses vs-solutionpersistence for sln(x) parsing.

