开发者

Merge Visual Studio Solution Files

We have two larg开发者_开发百科e 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?


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.


I just solved this myself using Perl and some regex magic

The script should work for both Windows and Linux, though I developed and ran it on Linux.


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.


You can try playing around with this tool:

http://code.google.com/p/merge-solutions/

It can also detect and fix duplicate guilds in projects/solution items that is a common result of project-wide copypaste.


I had to make my own a few days ago
download source+bin (54KiB)
(no license/public domain/copyleft/whatever makes you feel good:)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜