I don't think there's a tool to do that, but the solution file format is quite simple, so it's pretty easy to do it yourself:
static void Main()
{
string header = @"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1";
string globalSections = @"Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal";
string csharpProjectTemplate = @"Project(""{{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}}"") = ""{0}"", ""{1}"", ""{2}""
EndProject";
string rootPath = @"D:\MyProjects";
string solutionName = "MySolution";
string solutionPath = Path.Combine(rootPath, solutionName + ".sln");
var projectFiles = Directory.GetFiles(rootPath, "*.csproj", SearchOption.AllDirectories);
using (var stream = File.OpenWrite(solutionPath))
using (var writer = new StreamWriter(stream))
{
writer.WriteLine(header);
var xmlns = XNamespace.Get("http://schemas.microsoft.com/developer/msbuild/2003");
foreach (var projectFile in projectFiles)
{
string name = Path.GetFileNameWithoutExtension(projectFile);
string relativePath = projectFile.Substring(rootPath.Length).TrimStart('\\');
var doc = XDocument.Load(projectFile);
var guidElement = doc.Root.Elements(xmlns + "PropertyGroup")
.Elements(xmlns + "ProjectGuid")
.FirstOrDefault();
if (guidElement == null)
continue;
string guid = guidElement.Value;
string entry = string.Format(csharpProjectTemplate, name, relativePath, guid);
writer.WriteLine(entry);
}
writer.WriteLine(globalSections);
}
}
(You don't need to generate the ProjectConfigurationPlatforms
section, Visual Studio will automatically create the default build configurations for you when you open the solution)
The code above only handles C# projects; you might need to adapt it if you have other project types (you'll need to find the appropriate GUID for each project type).