Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
319 views
in Technique[技术] by (71.8m points)

c# - Generate Solution File From List of CSProj

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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 }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...