Monday, 23 July 2012

Build process for MTS

I've now come back to this project after finishing off another for the time being.  My first job was to do some improvements to the infrastructure.

The first improvement was to migrate to NuGet packages and a package restore workflow as opposed to a commit packages to version control workflow.  Here's an article that describes how this can be done:

http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages/

I could then write a batch file to restore references and rebuild the application without having the overhead of all the binaries under source control.  Very neat.

I've also now upgraded to EntityFramework 4.3.1 and am now using migrations instead of the old teardown and re-create database model.

Here's some useful links regarding EF 4.3. and migrations:
http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-automatic-migrations-walkthrough.aspx
http://blogs.msdn.com/b/adonet/archive/2012/02/09/ef-4-3-code-based-migrations-walkthrough.aspx
http://blogs.msdn.com/b/adonet/archive/2012/01/12/ef-4-3-configuration-file-settings.aspx
http://www.ladislavmrnka.com/2012/03/ef-4-3-migrations-and-existing-database/

I'm now ready to extend the build process to running unit tests and building an installer for the application.  Ideally, I want to be able to install remotely.  This is something new that I'll need to look into.