All posts by Paul Houghton

Speeding up new projects

We wouldn’t be the Parliamentary Rapid Apps Team if speed wasn’t important to us, and to our customers. As you can imagine, we are constantly picking up new projects and aiming to get a working product to our clients as quickly as we can, and one of the best ways to speed up that process is to speed up the time it takes to kick the project off.

Whenever we start a new project, someone has to go through the same steps just to get to a point where we can start coding for real:

  1. Create a new code repository for the project
  2. Create the shell of a project in Visual Studio
  3. Import useful features and 3rd party tools into the project
  4. Create TeamCity projects and builds for the project so it can have continuous integration and build monitoring, and be one-click deployed to the QA environment

Each time we do this, there is also potential for steps to be missed, copy and paste errors to occur or naming conventions to be ignored. And just as importantly, it takes time!

So simple a computer could do it

The solution to this problem is to automate this process as much as possible to cut down on manual mistakes, save time and make the most of our reusable code. So we have created MEGABuild™, which consists of two main components.


The first step was to identify which type of projects we create the most often (.NET MVC and .NET WebAPI) and what components and code we used in those projects repeatedly. We then created a Visual Studio solution for each type of project, which can be used as the perfect starting point for any new project. Our MVC solution template, for example, includes JQuery, Bootstrap, log4net, our custom stylesheets, a simple view layout and our basic configuration and automated build settings. Each solution is built with a number of keywords in it that can be replaced automatically when we use it to create a new project.


The final piece of the puzzle is a simple-to-use wizard that allows us to enter key information about a new project (such as its name and what namespace we should use) and then works away for a few minutes doing all the steps we would normally have to do manually. As a brief overview, it does the following:

  1. Checks out the latest version of the Solution template
  2. Creates the SVN repository for the new project
  3. Copies the solution template into the repo, and renames the keywords with the new project settings using powershell scripts
  4. Updates the ignore list for the new repo
  5. Commits the new solution to the repo
  6. Creates a new project and subproject in TeamCity
  7. Creates automated builds in TeamCity based on the build templates we have previously defined
  8. Finally, shows the user where they can find all this new stuff!


When the wizard has finished, you can simply checkout your new project from the repository and start coding!

Even more mega

We hope in the next couple of sprints to make MEGABuild™ to do even more for us. It can automatically enter DNS entries for our internal environments, and add details about the projects it creates to our other tools, such as our build monitor and our release management tool.