0

Getting Started with Continuous Integration with TeamCity in under 5 minutes!

by Jon 31. August 2010 22:17

Continuous integration is a way of increasing your productivity by automating the repetitive tasks you perform each day and as a function will improve the quality of the code you check into your source control system. It will give you more free time to develop better code, and will help you constantly improve yourself. If you find yourself doing the same thing day after day as a developer you really start automating those steps.

The good thing is it is really easy to setup a Continuous Integration. Within 5 minutes you could have installed and configured a system that will automatically compiled your code on a server when you perform a check-in and have any problems automatically reported back to you! What are you waiting for:

Make sure you choose a free TCP Port
Make sure you choose a free TCP port

Confirm the url for the Team City Installation has the correct port
Confirm the url for the Team City Installation has the correct port

Start the Services, and start TeamCity
Start the Services, and start TeamCity

Team City Starts
Team City Start

Accept the licence
Accept the licence

Enter an administrators details
Enter an administrators details

Team City is Started, and is prompting you to create a project
Team City is Started

Enter a project name
Enter a project name

Create a Build Configuration Called Build
Create a Build Configuration Called Build

Enter your SVN Settings for the project
Enter your SVN Settings for the project

Test the SVN Connection
Test the SVN Connection

Choose VisualStudio (2005/2008 or 2010) as a Build Runner, and Enter the Solution you want to Build
Choose VisualStudio as a Build Runner, and Enter the Solution you want to Build

Confirm the solution Builds from the Projects Screen, and then edit the Build
Confirm the solution Builds from the Projects Screen, and then edit the Build

Set the build to be automatically triggered when you Commit changes to SVN
Set the build to be automatically triggered when you Commit changes to SVN

and that's it, your Continuous Integration Server is up and running. Every time you commit a code change to SVN your solution will be automatically compiled. The sky is the limit, you can move over to a MSBuild Build Runner, perform automated tests, Generate Documentation, Code Statistics, Build and Install Deployment Packages. I've only just started using CI/TeamCity in my day job but I plan to Blog about my experiences as I implement more features. So far I have moved the office Build over to msBuild, automated developer statistics and RSS feed, and automated deployment to our test server. So expect some Blog entries on this in the coming weeks...
0

Guathon 2010, London

by Jon 15. August 2010 01:57

Guathon is about to start

Four people chatting before the guathon starts...

Tags: , , , , , , ,

asp.net | Deploy | development | scottgu | vs2010 | WP7

0

Where is WebDeploy aka MsDeploy installed to

by Jon 30. June 2010 11:54

Microsoft has a funky tool that atomates the deployment of web appplications.  It has a GUI interface and importantly a command line interface.  It isn't obvious where it is installed to, and microsoft have a naming issue (it is called webdeploy but the exe is called msdeploy)!  The folder msdeploy/webdeploy is installed to is here, enjoy

C:\Program Files\IIS\Microsoft Web Deploy

MSDN documentation is here

A Basics Blog here, but it is a little confusing

A sample Manifest.xml

Turns out its actually quite simple to do, the docs are over complicated.  All you need to go is create a blank zip file and Create a new xmlfile called Manifest.xml inside it and a directory for content.  When I finally have it working I will put together a easy step by step blog post.  Got a few things in the pipeline at the moment.

Tags: , , ,

Deploy

0

Dotnet Gets it wrong sometimes: 'mycontrol_ascx' is ambiguous in the namespace '_ASP'

by Jon 7. June 2010 16:27

When compiling larger more complicated ASP.Net projects which contain lots of user controls dotnet can get it wrong.  Im running the latest version of vs2008 with all the last patches but I still get occasional niggles.  Ive been getting an error telling me a control is ambiguous when I know it is totally unique.  The solution appears to be to tell the compiler to stop being quite so clever:

Find this, or a similar line in your web.config:

<compilation debug="false" />

Modify it and add batch="false", this stops the compiler being too clever.

<compilation debug="false" batch="false" />

Tags: ,

asp.net | General | vs2010

1

Developer Developer Developer South West #DDDSW

by Jon 6. June 2010 22:32

DDD SouthWest 2

I trundled down to DDDSW yesterday for a fantastic day of DDD geekyness.  The DDDSW team had thoughtfully laid on a Getting Started with .Net track I thought it would be a great way for my brother in law Kevin who is currently leaning dotnet to pick up some more skills.  Although the day was fantastic, I wasn't prepared enough, I need to remember to get alot more sleep before DDD events, as a consequence combined with the heat I wasn't in right frame of mind to mingle and chat as much as usual but I did talk to a bloke from Lincolnshire called Rob.

My Favourite Design Patterns, Gary Short

Yeah that was me, I was the demonstration!  No one else wanted to put there hand up, so a very tired jon went up and got my lefts and rights confused for a second.  Gary was explaining design patterns and how design patterns are used to facilitate leaning, they are a way of teaching people how to do stuff in a repeatable way without having to know the details of how the pattern works.  It was a great session.  I now know that my singleton pattern isn't as efficient as it should be, the singletons have written in the past have a couple of locks in them but I think I can bypass it with a static readonly:

class Singleton
{
    Singleton()
    {
    }

    public static Singleton Instance
    {
        get
        {
            return Nested.instance;
        }
    }
    
    class Nested
    {
        // Explicit static constructor to tell C# compiler
        // not to mark type as beforefieldinit
        static Nested()
        {
        }

        internal static readonly Singleton instance = new Singleton();
    }
}

What was nice about this session was that I kept on recognising patterns in my own code without knowing some of the official names of the patterns. I am using Garys design patterns without realising it because it seemed like the best thing to do at the time.

So you want to try scrum, Nathan Gloyn

Due to the number of true geeks at dddsw 2, this turned out to be a smallish session.  The way people develop and interact and the psychology of software development interests me.  In the past Agile, scum and other modern methodologies have been sold as something that can be achieved with a specific piece of software (which the person is trying to sell to you) or sold as something that needs to be done in one go (which the person can help you with through consultancy).  I disagree with this and I was very happy to see Nathan taking the same approach.  This was a very un-technical presentation of the building blocks of scrum, and given in a way that said you can get there in little steps.  I believe people get there quicker if they take small steps rather than a big bang change.

Scrum Board

Crap Code and the Disasters it Causes, Phil Winstanley

You have seen it before, every developer has seen it.  You join a project, you pick up some old code, or perhaps your working with someone, or perhaps it is you!  The code is scary, Phil went through some of the crap code he has seen in his travels and categorised the code into separate developer personality types.  Some of the code was very scary, some of the code was familiar and I may have even written some of it!  I understand the problems faced by developers that have progressed from vb within a single company, the world is a very different place.  In the past you sometimes had to fudge things to get them to work and habits die hard.  When your this kind of developer and your working on monolith of a project that was originally ported from 20 years old VB1 code there is fear to change things due to extreme spaghetti code.  When you have really old nasty missions critical code you learn from your peers not to change it too much.  I remember fixing some really code and a random appearing 6 months later for no valid reason.  Crap code is bad, but sometimes code is beyond repair, and attempting to fix it will also causes disaster.

Ajax with JQuery, George Adamson

George Adamson wrote some of JQuery so if you want to learn about AJAX with JQuery go see George.  A Great session it was a bit of a light bulb moment to see how query works in anger, AJAX is dead long live AJAX.  Microsoft has shifted AJAX development to JQuery so you really need to start using JQuery instead.  I'm not sure where this leave some of the control libraries such as Telerik?JQuery

Clean User Interfaces with ASP.NET Webforms, Dave Sussman

MVC is ok but it is relatively new technology, WebForms is tried and tested but know to generate messy html.  However was keen to show us if you turn everything off, turn the view state off, don't run with the .NET default settings and use dotnet 4 if you can and you get nice clean html.  WebForms isn't going to go away as it works, there are lots of sites and applications out there in the wild and there are other things in the pipeline for webforms such as MVP, that will only extend its life.DDD End, oh and the sponsers

All in all I had a fantastic day at DDDSW, a real credit to the organisers and I am already looking forwards to the next event.

Powered by BlogEngine.NET 2.0.0.36
Original Design by Laptop Geek, Adapted by onesoft, and finally some tiny tweaks by JonAlb