I've checked out a branch of C# code from source control. It contains maybe 50 projects in various folders. There's no existing .sln file to be found.
I intended to create a blank solution to add existing solutions. The UI only lets me do this one project at a time.
Is there something I'm missing? I'd like to specify a list of *.csproj files and somehow come up with a .sln file that contains all the projects.
If you select 'Show all Files' in the Solution Explorer, you can than view all the files and folers and select them and right click to add them using 'Include in Project'.
if you open the sln file with notepad you can see the format of the file which is easy to understand but for more info take a look @ Hack the Project and Solution Files .understanding the structure of the solution files you can write an application which will open all project files and write the application name ,address and GUID to the sln file .
of course I think if it's just once you better do it manually
A PowerShell implementation that recursively scans the script directory for .csproj files and adds them to a (generated) All.sln:
Depends on visual studio version.
But the name of this process is "Automation and Extensibility for Visual Studio"
http://msdn.microsoft.com/en-us/library/t51cz75w.aspx
Here is a PowerShell version of Bertrand's script which assumes a Src and Test directory next to the solution file.
There is extension for VS available, capable of adding all projects in selected directory (and more):
http://www.cyotek.com/blog/visual-studio-extension-for-adding-multiple-projects-to-a-solution