tags:

views:

208

answers:

2

I am working on a windows as well as web projects. We currently use Visual Studio to build our solution using visual studio 2008.

I would like to move to a more powerful build system such as Nant or MsBuild for atomate.

What are the ways & how i do this?

Currntly we use Visual source safe & mercurial(hg) as source control How does this all integrate with Source Control?

Help me all the ways.. Thanks!

+1  A: 

Last time I checked, NAnt didn't support VS2008 project files properly.

I personally like using NAnt as the general build controller, but delegating to MSBuild for the core "build the code into assemblies" part. This has worked well for me in Protocol Buffers, for example.

I don't know about using either VSS or Hg from NAnt, but I'd be very surprised if there weren't adapters available. Where do you need to integrate source control with the build, is it for version numbers, continuous integration, or something else? You may find that whatever continuous integration server you're using can handle the source control aspect itself, and that your build file doesn't need to know about it.

Jon Skeet
A: 

This really depends on what you want to automate and how. Visual Studio Solution files can be called directly from MSBuild, so to just build the solution without Visual Studio, nothing has to be done.

NAnt can call msbuild to build Solution files for you, so you can wrap you solution build in a NAnt script and do other useful things around it. This is how I usually do things. That way your build script and your solution files stay in sync.

NAnt has had VSS tasks since the dawn of time, so checking out the code is trivial. If they don't have a mecurial task, there is always the exec task which will allow you to run any commandline program (I assume there is one for mecurial).

Normally I have a build server with a working copy of the application/solution. Then, each night, the server calls a NAnt script that updates the working copy to the latest revision, and builds the solution using the msbuild task. Then you can do all kinds of nifty things like creating zips or tars, or even installers.

Swoogan