asp tutorials, asp.net tutorials, sample code, and Microsoft news from 15Seconds
Data Access  |   Troubleshooting  |   Security  |   Performance  |   ADSI  |   Upload  |   Email  |   Control Building  |   Component Building  |   Forms  |   XML  |   Web Services  |   ASP.NET  |   .NET Features  |   .NET 2.0  |   App Development  |   App Architecture  |   IIS  |   Wireless
 
Pioneering Active Server
 Power Search








Active News
15 Seconds Weekly Newsletter
• Complete Coverage
• Site Updates
• Upcoming Features

More Free Newsletters
Reference
News
Articles
Archive
Writers
Code Samples
Components
Tools
FAQ
Feedback
Books
Links
DL Archives
Community
Messageboard
List Servers
Mailing List
WebHosts
Consultants
Tech Jobs
15 Seconds
Home
Site Map
Press
Legal
Privacy Policy
internet.commerce














internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

HardwareCentral
Compare products, prices, and stores at Hardware Central!

Using Open Source .NET Tools for Sophisticated Builds
By Aaron Junod
Rating: 4.4 out of 5
Rate this article


  • email this article to a colleague
  • suggest an article

    Table of Contents

    • Page 1
      • Introduction
      • Overview
      • Setup Build Environment

    • Page 2
      • Build a Program Solution
      • Create First Build File and Build
      • Build a "Test" Project with Visual Studio .NET

    • Page 3
      • Vaildating Coding Standards During Build with FxCop
      • Create API Documentation
      • Add the Solution to VSS Source Control
      • Add Versioning
      • Use CruiseControl.NET To Monitor and Track Changes
      • Conclusion
      • About the Author

    • download source code and tools (14MB)

    Introduction

    Building an application can be more than pressing F5. Much more. With an increasing number of quality packages being released, developers for the .NET platform now have options to create a very sophisticated build process. This article describes a sample build environment and shows how a number of tools can work together to make reliable, predictable, and value added builds.

    The goals of the build system are outlined below.

    • Monitor source control for changes
    • Get latest source code from source control
    • Build the application in a versioned directory
    • Run unit tests over the new assemblies
    • Validate coding standards on the new assemblies
    • Create documentation based on the latest code
    • Publish the results to the Web and via e-mail
    As you can see, the build process will automate many tasks.

    First you will start with NAnt and create a sample build. Then you will expand the NAnt build file to run some other tasks as a sample of what else can be done. The steps are listed below.

    • Setup the build environment
    • Build a "program" solution with Visual Studio .NET
    • Create first NAnt build file and build
    • Build a "test" project with Visual Studio .NET
    • Add NUnit tests to build
    • Validate coding standards during build with FxCop
    • Create API Documentation during build with NDoc
    • Add the solution to VSS source control
    • Add SCC control to the build file
    • Add versioning
    • Use CruiseControl.NET to monitor and manage the build process
      • Trigger a build once something has changed
      • Report back to build master outcome via email and Web reporting

    This article is not an in-depth introduction to any of the concepts or tools used. This article should serve as a technical example of how some of the available tools can be used together. This is also just an example. All of the tools used here have many options that will not even be touch upon. You are encouraged to look deep into the help for each of these products and become creative in your own build process.

    Overview

    The main purpose of a build process is to build an application. A build process should collect all of the pieces of an application and create a deployable package for this specific version. By making this a process of its own, you add both reliability and predictability.

    Beyond a predictable build, a number of tools have been introduced that allow for other automated tasks to be run. In a team development environment, the build process would typically bring together code from a number of developers. That makes build time the ideal place to run tasks such as unit tests, and documentation creation. Having these tasks automated in the build can increase the quality of your code and offload some important tasks from the developers.

    In addition to adding value to builds, you also have the facility to track and report on the builds. When configured to trigger on a check into source control, your development team can receive unit test results via e-mail within minutes of any given change. This allows developers to react quickly to changes while they are still thinking about the change.

    The reporting also includes the results of a check against the coding standards. This allows code reviews to focus on code instead of standards.

    Below is a list of the packages that will be used, a brief description of each package and how it will be utilized.

    Nant (http://nant.sourceforge.net/)
    NAnt is the platform that will be used to create the actual build process. NAnt is an open source package modeled after Ant for Java. NAnt will be responsible for the actual building, as well as triggering any other tasks that will be run throughout the build process.

    NAntContrib (http://nantcontrib.sourceforge.net/)
    NAntContrib is a collection of add-on tasks for NAnt. NAntContrib is also an open source package. NAntContrib adds tasks for vss, the gac, ngen, and many nice tasks. NAntContrib will be used to communicate with VSS.

    NUnit (http://www.nunit.org/)
    NUnit is an open source unit testing framework for .NET and is modeled after JUnit for Java. NUnit allows developers to create test fixtures and write unit tests for their applications. NUnit includes a GUI and a commandline tool, as well as a set of attributes you add to test assemblies. NUnit will be used to unit test the class library in this article.

    NDoc (http://ndoc.sourceforge.net/wiki)
    NDoc is an open source package that creates API documentation from XML documentation files from Visual Studio .NET or packages like VBCommentor. NDoc allows developers many options when creating documentation and also comes in GUI and command line flavors. NDoc will be used to create HTML and chm documentation of the application.

    CruiseControl.NET (http://ccnet.thoughtworks.com)
    CruiseControl.NET ("CCNet") is an open source package used for Continuous Integration and build process reporting. Continuous Integration is a practice of creating a new build once updated files have become available, thus creating a continuous build process. Assuming tasks like unit testing are included in the build process, this allows teams to identify and fix bugs very quickly, provided there is good coverage in the unit tests of course. CCNet will be used to trigger and report on the build process.

    FxCop (http://www.gotdotnet.com/team/fxcop/)
    FxCop is a package distributed by Microsoft to enforce coding standards. FxCop automates the process of analyzing code for coding standards. This allows peer review sessions to really focus on code and not waste time on things like correcting casing or naming violations. FxCop will be used to analyze the coding standards in the application.

    Visual Source Safe (http://www.microsoft.com/vstudio)
    Visual Source Safe ("vss") is a source control package distributed by Microsoft. VSS is commonly used for source control when using Visual Studio .NET. It's used here because of its wide availability and adoption, but the concepts in this article would translate to most other source control systems by changing a couple elements in the NAnt file.

    Setup Build Environment

    [Easy Way
    	Unzip attached BuildSolution.zip into c:\projects
    	Unzip attached devtools.zip into c:\devtools]
    
    So now it's time to dive right into action. The first thing that needs to be done is to install these tools. Although not necessary, it's nice to have these tools in one place, i.e. c:\DevTools.

    Provided with this article is a devtools.zip of the various packages that should be installed here and configured appropriately. You can extract this zip file into c:\devtools to review the samples. The steps are outlined below.

    Install/Extract Packages

    1. Download and extract NAnt to c:\devtools
    2. Download and extract NantContrib to c:\devtools
    3. Download and install nunit to c:\devtools
    4. Download and install NDoc to c:\devtools
    5. Download and install FxCop to c:\devtools
    6. Download and extract CCNet to c:\devtools

    Add NAntContrib to Nant

    1. Copy all of the files from c:\devtools\nantcontrib\bin into c:\devtools\nant\bin

    Build a "Program" Solution >>

  • Rate This Article
    Not HelpfulMost Helpful
    1 2 3 4 5
    Supporting Products/Tools
    CustomError 2.0 for IIS
    When errors occur on a Web site, they should be handled in a way that helps the user to get back on track. Unfortunately, setting up customized error pages in IIS usually requires something many Web developers lack -- access to and familiarity with the Web server's administrative interface. With CustomError for IIS, developers can add error pages, coded by hand or created in their favorite editor, by simply uploading them to a designated directory. No administrator intervention is required.
    [Top]
    Other Articles
    Jul 28, 2005 - N-Tier Web Applications using ASP.NET 2.0 and SQL Server 2005 - Part 2
    In the second part of his series on building N-tier web applications using ASP.NET 2.0 and SQL Server 2005, Thiru Thangarathinam covers the business logic and user interface layers. In the process, he also examines some new features in ASP.NET 2.0 that greatly simplify the development process.
    [Read This Article]  [Top]
    Jul 14, 2005 - An Innovative Technique for Creating Reusuable Page Templates in ASP.NET 1.x
    Code reusuability is one of the major goals of any good object-oriented programmer. While the ASP.NET framework has made code reusuability easier and more elegant than it was in classic ASP, one area where reusuability could be improved is at the UI level. This article outlines a technique that you can use in ASP.NET 1.x that allows every page in your web application to inherit not only the functionality of a base page, but its UI as well.
    [Read This Article]  [Top]
    Jun 23, 2005 - Monitoring SharePoint Usage through an ASP.NET Web Application
    In this article, Gayan Peiris looks at creating an ASP.NET web application that will display the usage details of a selected SharePoint site. Building such an application enables SharePoint administrators to gather all SharePoint usage data from a central location.
    [Read This Article]  [Top]
    May 12, 2005 - Retrieving SharePoint Site Information in an ASP.NET Web Application
    In this article, Gayan Peiris examines using the SharePoint Object Model to access SharePoint site information from an ASP.NET web application. It should be of particular interest to SharePoint administrators who can use the included code as a starting point for development of their own web-based SharePoint administration application.
    [Read This Article]  [Top]
    Dec 23, 2004 - Automated Deployment for Side By Side .NET Web Apps for Visual Studio .NET 2003
    In this article, David Every outlines a step-by-step account of how he solved the problems he encountered while implementing an auto-deployment process. He also describes how to create a stable process for automated remote .NET deployment featuring "side-by-side" capability.
    [Read This Article]  [Top]
    Sep 29, 2004 - Developing Web Parts with ICellConsumer Interface
    Most default SharePoint Server Web Parts can be connected across organizations. The third article in this series shows how to develop connectable Web Parts that consume information provided by other Web Parts.
    [Read This Article]  [Top]
    Aug 10, 2004 - Implementing and Promoting Daily Builds
    Automatic daily builds is a well known software engineering best practice. This article introduces a strategy for implementing and promoting daily builds and offers tips and tricks for preventing and fixing breaks.
    [Read This Article]  [Top]
    Jun 24, 2003 - Programming for the Palm Part 1 - Creating the Palm Application
    The first part of this three part series walks through the process of creating a mobile blog application using a BASIC development environment for Palm OS devices called NS Basic. Subsequent articles will focus on synchronizing the data to the desktop using C# and creating an installer.
    [Read This Article]  [Top]
    Jun 18, 2003 - Online Database Functions Testing Tool
    This short article provides source code for a classic ASP online database functions testing application and shows how to configure and use the tool for either SQL Server or Oracle.
    [Read This Article]  [Top]
    May 22, 2003 - Rewrite.NET -- A URL Rewriting Engine for .NET
    In this article Robert Chartier shows you how to use functionality in the .NET Framework to rewrite requested URLs on the fly.
    [Read This Article]  [Top]
    Mailing List
    Want to receive email when the next article is published? Just Click Here to sign up.

    Support the Active Server Industry



    JupiterOnlineMedia

    internet.comearthweb.comDevx.commediabistro.comGraphics.com

    Search:

    Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

    Jupitermedia Corporate Info


    Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

    Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

    Solutions
    Whitepapers and eBooks
    Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
    Avaya Article: How to Feed Data into the Avaya Event Processor
    Microsoft Article: Install What You Need with Win Server ‘08
    HP eBook: Putting the Green into IT
    Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
    Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
    Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
    Avaya Article: Setting Up a SIP A/S Development Environment
    IBM Article: How Cool Is Your Data Center?
    Microsoft Article: Managing Virtual Machines with Microsoft System Center
    HP eBook: Storage Networking , Part 1
    Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
    MORE WHITEPAPERS, EBOOKS, AND ARTICLES
    Webcasts
    Intel Video: Are Multi-core Processors Here to Stay?
    On-Demand Webcast: Five Virtualization Trends to Watch
    HP Video: Page Cost Calculator
    Intel Video: APIs for Parallel Programming
    HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
    Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
    MORE WEBCASTS, PODCASTS, AND VIDEOS
    Downloads and eKits
    Sun Download: Solaris 8 Migration Assistant
    Sybase Download: SQL Anywhere Developer Edition
    Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
    Red Gate Download: SQL Compare Pro 6
    Iron Speed Designer Application Generator
    MORE DOWNLOADS, EKITS, AND FREE TRIALS
    Tutorials and Demos
    How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
    eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
    IBM Article: Collaborating in the High-Performance Workplace
    HP Demo: StorageWorks EVA4400
    Intel Featured Algorhythm: Intel Threading Building Blocks--The Pipeline Class
    Microsoft How-to Article: Get Going with Silverlight and Windows Live
    MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES