Friday, December 28, 2012

A way to clean a Visual Studio 2012 solution.

I have a solution that I would like trimmed down to the bare essentials; here is my idea I'm going to test.

Copy the entire the Visual Studio solution (projects, junk, and all) into two full copies one per folder.
Example: "SolutionA" and "SolutionB". The goal here is to have TWO working copies of the real solution.

Disclaimer: You are responsible for your own action.

Load up solutionA, and use Resharper (or any other similar program) to "Format/Clean" the source code. All files. Make them formatted your "not normal" way, then your normal/approved way.

The idea here is to induce changes. Change each projects settings around. Then change them back to 'correct'. Induce the most changes you can think of, although make sure each project can still build and pass unit testing.

Find a duplicate file remover that will scan file CRC (or even byte by byte). Let it find all duplicate files between SolutionA and SolutionB.

Then remove all duplicate files found under the SolutionA folders that you feel comfortable removing.

Test the build!

If everything is okay, you should have a slimmed down version of your projects.

Notice: Your results may vary. Let me know what worked.


No comments: