Sunday, 13 July 2008

Automating your project compilation,Testing & Documentation for developers

Project compilation,Testing & Documentation for developers; You must be wondering sometime if you can do all this in a just click.

Yes its possible through the usage of following tools
  • CruiseControl
  • NANT
  • Nunit
  • NDoc

CruiseControl very well integrates with these tools. I use Cruisecontrol to manage the build for all my projects. Use Nant to script my build process and NUnit to script my Test cases. NDoc will generate MSDN like help file with every build. Thats Cool!! It always keep my documentation in sync.

I will provide some sample scripts in my future post for your reference. I have script/ sample for all of these tools. And I am sure that will really help you guys in easily configuring the same for your projects.

Friday, 4 July 2008

NANT Build for .Net 2.0 / 3.0 / 3.5

I have successfully automated the build process using Nant and Cruisecontrol tools for Framework 1.1. I am currently working on extending same for .Net Framework 2.0 , 3.0 and 3.5 .

NAnt 0.86 Beta 1 Release supports all the folowing Frameworks for .Net as per the release notes

.NET Framework 1.0
.NET Framework 1.1
.NET Framework 2.0
.NET Framework 3.5

Some of my collegues have faced problem in compiling VS 2005 projects with Nant and Cruisecontrol. They used something like this

<solution solutionfile="MySolution.sln" configuration="release" outputdir="c:\temp" />

I have spend some time to understand why they were facing problem in compiling these projects and found that some how Nant script was not interpreting the Solution files correctly and because of that they were facing issues.

The way i write build scripts for compiling is that rather than solution file in tag I specify a list of project files in a text file and mention that file in . And it works perfectly. Something like this

Option 1:

<solution configuration="release">
<includesfile name="Myprojects.txt" />

Option 2: You can also specify as follows

<solution configuration="release">
<include name="Proj1\Proj1.vbproj" />
<include name="Proj2\Proj2.vbproj" />
<include name="ProjA\ProjA.vbproj" />

Option 1 is more flexible as you can easily add or remove projects or change order of compiling without touching your build script.

I will provide more samples in future post.

Today its "Happy Independence Day". So its time to enjoy fireworks.

Thursday, 27 March 2008

Automation for .Net Developer

I always look for opportunities to automate things as far as possible. I do small automation in MS Excel, MS Outlook to automate many day to day tasks to improve productivity. Automation with Microsoft Office product is easy as they all share same Scripting engine. If you know VBA you can master this skill to do automations in any such Office products.

First step is to automate repetitive things. Next step is to a combine all such small automation pieces to form one logical task that you perform often.

I mainly do coding in .Net. As a developer we do so many tasks again and again. Like coding, building, deploying, testing, rectifying identified issues in coding, again going thru same process again and again until you get a good quality product.

For automating these steps in building >net code written in Visual Studio 2003. I use some tools like CruiseControl, Nant, NUnit, NDoc, etc. I am currently in process of automating most of these steps using these tools. Soon i will be publishing it on this Blog, hence keep visiting for code samples.

"Happy Automating"!!