Easy way to add multiple existing .csproj to a Vis

2019-01-13 03:09发布

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.

13条回答
The star\"
2楼-- · 2019-01-13 04:12

Every answer seems to flatten the directory structure (all the projects are added to the solution root, without respecting the folder hierarchy). So, I coded my own console app that generates the solution and uses solution folders to group them.

Check out the project in GitHub

Usage

  SolutionGenerator.exe --folder C:\git\SomeSolutionRoot --output MySolutionFile.sln
查看更多
登录 后发表回答