简体   繁体   中英

How to copy a disorganized Visual Studio solution?

Hey. I've a very large C# solution, with many projects that are messy in many locations in my computer. I want to send the solution to a friend. Is there any tool to copy the solution to a new directory, with all the projects in it, cleaned and organized?

Thanks.

Nope, not as far as I know.

I would suggest you copy and paste them manually in the structure you want and then simply open the solution file in any plain text editor and fix it so it references the appropriate subfolders with proj files in.

It's a very trivial task to do manually.

How about cleaning it up in the first place?

Friends don't share messy solutions with friends

No, unfortunately not ... you will have to copy each project into a folder, open the solution, and then reset every single project reference until it builds. Then you can zip up that one folder and send it

this is why one should always make their solutions so that each project is relative to the solution under the same folder :-)

Your question inspired me to add new functionality to my application VS Solution Dependency Visualizer : the latest version lists all directories used in a project and VS solution.

While this does not "copy the solution", as you requested, it gives you an overview of where your files are located.

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