I’ve had a little utility I’ve used on my consulting gigs from time to time that I wrote a while back, and I’ve finally decided it needed a home of its own.  As you can read below, it allows me to keep fairly complex pre-built project structures, and then duplicate them with a click of a button, renaming them to whatever I need.  You can download the latest release, or you can check out the project on CodePlex.

Project Description
A utility to allow you to clone an existing solution, renaming it as you do so, and updating references inside the various files.

The Problem

Do you have a favorite project structure you setup every single time you start a new project? I surely did, and I got tired of having to re-create that structure every time. Especially since my structure was a complex many levels deep set of build files and other support files and projects I used when implementing the BizTalk Deployment Framework.

The Solution

Tired of that work, because I'm a lazy programmer, I created this project that would duplicate an existing solution directory. I setup an archive project called SolutionNameHere, which contained projects like SolutionNameHere.Orchestrations, and then let this program translate every reference to "SolutionNameHere" in either a path or a filename (or even some file contents) to whatever new name I wanted.

File Types

At the current time, Solution Clone is aware of the following types of files within your projects that it does more than simply rename and move. These files will be modified to update any references to the old solution name as they are moved. These file types currently include:

  • .sln - Visual Studio Solution Files
  • .vbproj - Visual Basic Project Files
  • .csproj - C# Project Files
  • .build - Build files used by NAnt and other build mechanisms
  • .nant - NAnt scripts

This list will almost certainly be updated in future versions to include other types of files.