How and why do I set up a C# build machine?

Posted by mmr on Stack Overflow See other posts from Stack Overflow or by mmr
Published on 2009-03-05T19:03:47Z Indexed on 2010/05/03 23:18 UTC
Read the original article Hit count: 264

Hi all,

I'm working with a small (4 person) development team on a C# project. I've proposed setting up a build machine which will do nightly builds and tests of the project, because I understand that this is a Good Thing. Trouble is, we don't have a whole lot of budget here, so I have to justify the expense to the powers that be. So I want to know:

  • What kind of tools/licenses will I need? Right now, we use Visual Studio and Smart Assembly to build, and Perforce for source control. Will I need something else, or is there an equivalent of a cron job for running automated scripts?
  • What, exactly, will this get me, other than an indication of a broken build? Should I set up test projects in this solution (sln file) that will be run by these scripts, so I can have particular functions tested? We have, at the moment, two such tests, because we haven't had the time (or frankly, the experience) to make good unit tests.
  • What kind of hardware will I need for this?
  • Once a build has been finished and tested, is it a common practice to put that build up on an ftp site or have some other way for internal access? The idea is that this machine makes the build, and we all go to it, but can make debug builds if we have to.
  • How often should we make this kind of build?
  • How is space managed? If we make nightly builds, should we keep around all the old builds, or start to ditch them after about a week or so?
  • Is there anything else I'm not seeing here?

    I realize that this is a very large topic, and I'm just starting out. I couldn't find a duplicate of this question here, and if there's a book out there I should just get, please let me know.

    EDIT: I finally got it to work! Hudson is completely fantastic, and FxCop is showing that some features we thought were implemented were actually incomplete. We also had to change the installer type from Old-And-Busted vdproj to New Hotness WiX.

    Basically, for those who are paying attention, if you can run your build from the command line, then you can put it into hudson. Making the build run from the command line via MSBuild is a useful exercise in itself, because it forces your tools to be current.

  • © Stack Overflow or respective owner

    Related posts about c#

    Related posts about build