Building .NET projects using Hudson Continuous Integration

This is a quick start up to getting your .NET Visual Studio projects to build using Hudson Continuous Integration server.
  1. Download and install latest version of Java
  2. Download Hudson server You might get Rename it as hudson.war. Suppose c:\Hudson\hudson.war
  3. Start Hudson using the command java -jar hudson.war You will see the output like –
  4. Use the browser and hit http://localhost:8080/ This is the beauty of Hudson. Once you see the Hudson Dashboard it means you are up and running
  5. Go to Manage Hudson and if you see a new version of Hudson is available install it
  6. Go to Manage Hudson-> Configure System and install the MSBuild plugin, MSTest plugin, NUnit plugin, Violations plugin and NAnt plugin
  7. Shut down hudson and start it again. This will get the new version up and running
  8. Go to Manage Hudson->System Configuration http://localhost:8080/configure and configure path of MSBuild.exe to point to c:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe
  9. Configure the email settings and NAnt settings etc

At this point installation and configuration is complete. Now to create jobs

  1. On the Dashboard Click New job->Build a free-style software project->OK
  2. Enter the SVN url of the project [Hudson has built-in SVN support. If you use other source control systems then you might have to install plugins]
  3. To test the configuration, press Save and then Build. The source code will be downloaded from the repository and put into the Workspace
  4. Click the ‘Add build step’-> ‘Build a Visual Studio project or solution using MSBuild’ Enter the solution file path if you want to build the entire solution or the project path
  5. To test the configuration, press Save and then Build. Now the source code should be updated if there any changes and then built using MSBuild. While the build is running you can check the Console log that is updated as the build continues.
That’s it folks. Try it and let me know if that works! Hudson is very configurable so you can be creative with your builds and test cases.

PS: I will add pictures shortly.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s