Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Merge Visual Studio Solution Files

We have two large solution files that we would like to merge into a single solution.

We could just add the projects from solution A to solution B. But wondering if there is a less time consuming way to do this?

like image 407
Shiraz Bhaiji Avatar asked Jan 06 '11 10:01

Shiraz Bhaiji


2 Answers

I had similar requirement to merge a few .sln files into one (Visual Studio 2013). What I did was:

  1. Open one .sln in visual studio [File > Open > Project/Solution...]

  2. Open second .sln in visual studio [File > Open > Project/Solution...] but select 'Add to Solution' option. You might then get warnings that project of same name already exists - ignore them. If there are duplicate folder names, you may need to resolve them after the projects are added to new .sln file

  3. Repeat step 2 for all the rest of .sln files

This worked for me, not sure what would happen in case of duplicate GUIDs though.

like image 172
nkanani Avatar answered Oct 21 '22 02:10

nkanani


It's quite error-prone merging two versions of the same solution file - merging two separate files would be even more error-prone in my opinion.

I know no tools for this - my normal approach has been to use VS itself and manually add the projects.

like image 33
vlad259 Avatar answered Oct 21 '22 04:10

vlad259