Subversion... Check! CruiseControl.Net... Check! NAnt or MSBuild... ???? - To Dev or not to Dev
Sunday, July 29, 2007 11:06 PM Willie Roberts

Subversion... Check! CruiseControl.Net... Check! NAnt or MSBuild... ????

I will be the first to admit that I am a bit late catching on to the whole Subversion and CruiseControl.Net revolution. In the past my project managers rarely found any value in these tools, and I will admit it is still rare to find a project manager who does. After being introduced to CVS a few months back I started investigating various development tools, not only to improve productivity but also to learn.

SubVersion The first product I started looking at in earnest was Subversion. About 3 months ago I installed the Subversion server on the SBS 2003 server running at home and spent some time reading the online manual and setting it up. I am amazed at how simple source control has become, especially considering that I run two notebooks and have different copies of projects around on either at any point in time. The simple file based method of managing code turned out to be a lot less time consuming then I initially thought. I also now use Subversion to keep copies of important documents and other files up to date, and TortoiseSVN's seamless integration makes the process a simple joy. Moving code around has also become easier since there is no source control binding to be concerned about when not near the source control server. Backup is also simplified by just having to back up the SVN repository. Since both SVN and TortoiseSVN are open source, there is no cost implication on implementing these two applications, and provide a easy method to manage not only single developer projects but most importantly teams of developers working on various projects. My first stop when creating a new project has become Subversion, and within 10 minutes I have complete source control configured, working with the least amount of headaches.

CruiseControl.Net Two weeks ago I started implementing CruiseControl.Net. I was previously introduced to CC.Net by Craig who uses it extensively for some time now. After the quick learning curve to understand the CC.Net configuration file, I had my first project running, compiling, and publishing within an hour. Currently my CC.Net server monitors around 20+ projects, each linked to my SVN repository, building everything I need the moment I check in new code. I use the VS Express Studios extensively and find that both Subversion and CC.Net fills the gap created by VS Express as far as source control and code publishing is concerned. By using CC.Net to compile and publish the final code, full use of the ASP.Net Publish utility can be made. I also appreciate not having to load a full copy of the VS Development Environment on my server, making it much simpler to use. I actually came up with a simple and easy solution to update my CC.Net configuration as well. The configuration file is stored inside my Subversion repository and CC.Net monitors a project which will simply check out the new configuration file if it detects a change, and because of it's ability to restart automatically when a new configuration file is submitted, it loads any changes I have made or adds any new projects I may have created. It also means that if I have to recover my server for any reason, the latest configuration file is already sitting in source control, and I will basically be able to pick up from where I left off.

This weekend I decided to look into the world of NAnt, NUnit and FxCop. I've spent a lot of time reading and trying to determine which of these tools I should implement and how. I do believe NUnit and FxCop goes without saying, and integrating these into CC.Net seems simple enough. My dilemma is currently whether I should use NAnt to compile or continue using MSBuild. I am not entirely pleased with having to use solution files in CC.Net to fire the MSBuild process, however I am not finding enough information about NAnt online to make it a primary choice, in fact the few samples I have tried to implement failed miserably. I need step by step samples, and currently the lack of these is frustrating me slightly. I have also never used FxCop or NUnit before, however I believe the learning curve is worth the time investment. Hopefully some time this week I will find the answer to these questions and by the end of August have a new and improved development methodology going.

Filed under: , , , , ,

Comments

# re: Subversion... Check! CruiseControl.Net... Check! NAnt or MSBuild... ????

Sunday, July 29, 2007 11:35 PM by trumpi

Surprisingly, we use both NAnt and MSBuild. The way that we do it is to use the solution and project files to build the assemblies. This is the MSBuild part. However, between CruiseControl and the solution files is a NAnt script that will call the solution file, run unit tests, static analysis and create a distributable package.

The reason that we did things this way is because:

1) If a developer changes the project file in Visual Studio, then that change should be reflected in the build. If we build our assemblies in NAnt, then the change needs to be done twice.

2) Things that are not part of the project files we chose to do in Nant since it is much easier to work with NAnt than with MSBuild. Not only that, but there are far more NAnt skilled professionals than MSBuild skilled professionals.

# re: Subversion... Check! CruiseControl.Net... Check! NAnt or MSBuild... ????

Monday, July 30, 2007 5:36 PM by Carel Lotz

Willie

I prefer using MSBuild only.  I came from a NAnt background and initially struggled a bit with MSBuild.  After spending some time with it, I found it to be quite powerful though.  There is a community of additional MSBuild tasks to supplement the existing tasks and because this is the MS way of building, you know they will keep on improving the feature set (i.e. like parallel builds feature in VS 2008).

I've created a series of articles that document how to setup a complete CI process using MSBuild, Subversion and a whole lot of open source tools like NUnit and NCover.  You can find it here dotnet.org.za/.../part-1-continuous-integration-using-msbuild-cruisecontrol-net-fxcop-nunit-ncover-subversion.aspx.

Hope this helps.

# re: Subversion... Check! CruiseControl.Net... Check! NAnt or MSBuild... ????

Monday, July 30, 2007 9:08 PM by Willie Roberts

Thanks for the feedback. Definitly going to continue my investigation using the provided links. It seems like MS Build is the way to go in the long run, but FxCop and NUnit are definitly tools I will be implementing.