简体   繁体   中英

Adding multiple projects to a single solution simultaneously in Visual Studio 2010

At my company, our software for one set of services is broken out into many different solutions containing any number of 350+ projects. My job at the company is to trace through all of this code to find where errors occur.

To facilitate this, I would like to have all of the projects contained within a single solution. I can do this via the 'Add Existing Project...' menu item, but it only allows me to add one project at a time. I also noticed that I can add existing items (multiple simultaneously) from Windows Explorer by dragging them onto a solution folder, but that doesn't import projects; it only adds the project file itself to the folder.

Is there a way to add multiple projects to a solution simultaneously? I realize that this may (read: will) take a long time.

I think you are looking for something like this: http://nprove.codeplex.com/

This allows to load aa project or a folder with projects from the team foundation source control explorer into the current solution.

A solution would be to create a small program that takes as input the list of projects you want to add to your solution (or that scans a directory for *.csproj, *.vbproj...) and writes to the *.sln file of your solution.

If you open a *.sln file with notepad, you'll see there is no magic in it, it's just a text file that contains the list of projects (with their GUID) and some information about the build configuration. Look at the structure of a solution file and try to write a piece of code that does the same as visual studio when user adds a project to the solution.

I'm pretty sure that can be automated with a small effort. Just a matter of file parsing.

Visual Studio Extension "Add Existing Projects" (Created by: Cyotek) allows you to add multiple projects to one solution by selecting all once. Worked perfectly for me on VS2017.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM