I've got alot of projects and I don't have a master solution with everything in it. The reason I want one is for refactoring.
So I was wondering if anybody knew an automatic way to build a solution file. Manually adding all the projects just isn't feasible.
Open VS Code in a new folder. Open a new Terminal window. The shortcut for this is CTRL+SHIFT+'. Create a new file in the folder.
To create an empty solutionOn the menu bar, select File > New > Project. On the Create a new project page, type solution into the search box. Select the Blank Solution template, and then click Next. Enter Name and Location values for your solution, and then select Create.
In 2018, you can use dotnet sln
command to add project to an existing solution and dotnet new sln
to create a new one.
To add all projects from current folder use these commands in PowerShell
dotnet new sln
Get-ChildItem -Recurse *.csproj | ForEach { dotnet sln add $_.FullName }
And I have now updated my utility (mentioned above) to support creation of solution folders: http://bloggingabout.net/blogs/vagif/archive/2009/12/03/utility-to-generate-solution-files-can-now-create-solution-folders.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With