New to Telerik JustMock? Download free 30-day trial


NAnt is a free and open source software tool for automating software build processes. It targets the .NET environment. NAnt is an XML-based language where you order tasks to perform build operations.

You can download the NAntIntegrationAssembly from here.

This topic demonstrates how to integrate Telerik JustMock with a NAnt build task.

To learn more about NAnt refer to NAnt official website.

How to run your unit tests from a NAnt task

  1. Open your NAnt project and under the Project\Target node include Telerik JustMock assembly for integration with NAnt. The assembly is named NAntIntegrationAssembly and can be downloaded from here.

    <loadtasks assembly="C:\Program Files (x86)\Telerik\JustMock\Libraries\Telerik.JustMock.NAnt.dll" />

    Remember to change the assembly path to the one specific for you system.

  2. Before running a test, execute the following:

    <justmockstart />
  3. After running a test, execute the following:

    <justmockstop />
In this article