NAnt Release Notes

NAnt logo (link to home page)

0.91-alpha2 (August 17, 2010)

Bug fixes

Core

App.config

Fixed typo that prevented System.Management.dll from being included.

Tasks

<include>

Fixed error with the <include> task when different build files include the same file. (bug #3016497).

Functions

NAnt::get-assembly()

Using the NAnt::get-assembly() function causes an "Object must implement IConvertible" error. (bug #3013492).

0.91-alpha1 (May 29, 2010)

Framework support

Bug fixes

Expressions

Coercion

Coercion of arguments is not supported (bug #3013492).

Changes

Tasks

<xmlpeek>

Enhanced the <xmlpeek> task to support more advanced XPath functions and syntax. It is now possible to use functions such as count() and to index the node using XPath directly. (feature request #1560566).

0.90 (May 8, 2010)

Bug fixes

Tasks

<tar>

When the "destfile" attribute specifies a non-existent path, the base directory(ies) will be created. (bug #2997300).

0.90-rc1 (May 2, 2010)

Bug fixes

Core

<PathScanner>

Catch UnauthorizedAccessException in PathScanner to prevent NAnt from crashing when using the Scan() function to search for file(s) in directory with special permissions.

0.90-beta1 (April 17, 2010)

Bug fixes

Tasks

<csc> / <jsc> / <vbc> / <vjc>

When the "output" attribute specifies a non-existent path, the base directory(ies) will be created. (bug #2985057).

ExternalProgramBase

For certain tasks (NDoc, Exec, MSBuild, etc) the console output is unorganized and difficult to read. (bug #2981604).

<script>

Cleanup the output to show assembly information and functions only when "verbose" attribute is set to "true". (bug #2981386).

<zip>

When the "zipfile" attribute specifies a non-existent path, the base directory(ies) will be created. (bug #2981389).

0.90-alpha1 (April 1, 2010)

Breaking changes

Core

Extensibility

Tasks

<script>

As of this release, only the following namespaces are imported by default:

Starting from this release, only NAnt.Core and mscorlib will be referenced by default.

In previous releases, all loaded assemblies would implicitly be referenced.

Bug fixes

Extensibility

DataTypeBaseBuilder / FilterBuilder / TaskBuilder

Changes to constructors break backward compatibility (bug 2782705).

Expressions

Identifiers

Identifiers containing a dot or backslash are falsely rejected.

Framework support

.NET Framework (All)

The target framework cannot be initialized if the .NET Framework SDK is not installed (bug #1859708).

.NET Framework 1.1

Added the following assemblies to the list of reference assemblies:

Fixes bug #1848648.

.NET Framework 3.5

Tasks

<echo>

A newline is implicitly added when writing a message to a file (bug #2807728).

<echo>

When "output" parameter is specified, standard output is redirected properly. (bug #1010223).

ExternalProgramBase

The value of UseRuntimeEngine is not respected when overriden by derived classes (bug #1850383).

<move>

When source file is newer than destination file, then an error is reported if "overwrite" is not set to true.

<solution>

Solution Folders result in build failure (bug #1732361).

<xmlpeek>

"verbose" feature is now worked as documented (bug #1911292).

<zip>

Improved backward compatibility with older unzip implementations.

Types

<fileset>

Files matching the **/vssver2.scc pattern are not excluded by default (bug #2515816).

Additions

Functions

environment::newline()

Gets the newline string defined for this environment.

framework::get-description()

Gets the description of the current target framework.

framework::get-clr-version()

Gets the CLR version of the current target framework.

framework::get-frameworks(NAnt.Core.FrameworkTypes)

Gets a comma-separated list of frameworks filtered by the specified FrameworkTypes.

For example:

    <target name="build-all">
        <foreach item="String" in="${framework::get-frameworks('installed compact')}" delim="," property="framework">
            <property name="nant.settings.currentframework" value="${framework}" />
            <call target="${framework}" />
        </foreach>
    </target>

    <target name="build">
        ...
    </target>
                
framework::get-version()

Gets the version of the current target framework.

platform::is-windows()

Return a value indicating whether NAnt is running on Windows.

Tasks

<untar>

Extracts files from a tar archive.

Changes

Packaging

pkg-config

When installing NAnt from source on Unix (using make install), a nant.pc is now installed in $prefix/lib/pkgconfig.

DESTDIR

To allow for staged installs, our makefile now also supports the DESTDIR variable:

    $ make DESTDIR=/tmp/local install
                

Functions

platform::is-win32()

This function is deprecated, use platform::is-windows() instead.

Tasks

<csc> / <jsc> / <vbc> / <vjc>

Added "winres" attribute to specify a Win32 resource file.

<echo>

The "encoding" attribute can be used to specify the encoding when writing messages to a file.

    <echo file="build.cmd" encoding="ascii">...</echo>
                
<link>

Added "moduledefinition" parameter to allow the name of the module definition file to be set.

<nunit2>

Allow referenced assemblies to be specified using <references> element on <test>:

    <nunit2>
        <test>
            <assemblies basedir="build/tests">
                <include name="Cegeka.HealthCare.DocGen.Tests.dll" />
                <include name="Cegeka.HealthCare.Util.Tests.dll" />
            </assemblies>
            <references basedir="build/lib">
                <include name="Cegeka.HealthCare.Common.dll" />
                <include name="Cegeka.HealthCare.DocGen.dll" />
                <include name="Cegeka.HealthCare.Util.dll" />
            </assemblies>
        </test>
    </nunit2>
                
Previously, all referenced assemblies needed to be either in the GAC, or in the directory containing the test assembly.
<solution>

Introduced support for targeting a specific platform, as defined in the solution or project.

<xmlpoke>

Added "preserveWhitespace" parameter to retain the original format of the XML files.

<unzip>

Added "overwrite" parameter to control whether to overwrite files even if they are newer than corresponding entries in the archive.

Third-Party

#ziplib

Types

<fileset> / <patternset>

For patterns specified using <includesfile> or <excludesfile>, lines that have a number sign (#) as the first non-blank character in a line are now ignored.

0.86-beta1 (December 8, 2007)

Breaking changes

Core

nant.tasks properties

Prior to NAnt 0.85, build authors would use a "nant.tasks.*" property to check whether a given task was available.

With the introduction of expression support in NAnt 0.85, we provided a more powerful alternative through the task::exists function.

As of this release, the "nant.tasks.*" properties are therefore no longer set by NAnt.

nant.failure

Removed support for the "nant.failure" property to set the target that should be executed when the build fails.

This property was deprecated in NAnt 0.83 in favor of the "nant.onfailure" attribute.

As of this release, setting the "nant.failure" attribute will no longer have any effect.

Expressions

= operator

In NAnt 0.85, support for the '=' operator to check for equality was deprecated in favor of the '==' operator.

As from this release, the '=' operator is no longer recognized.

Tasks

<style>

Bug fixes

Core

MailLogger
Response File
Document Type Definition

Framework support

Mono/Cygwin

Tasks

<call>
<csc>
<exec>
<resgen>
<solution>

Third-Party

#ziplib

Types

<fileset>

Additions

Expressions

Version operators

Introduced support for relational operators between version values.

Framework support

Tool paths

Since NAnt 0.84, task authors have been able to specify the location of the command-line tool by applying a ProgramLocationAttribute to classes deriving from ExternalProgramBase.

The ProgramLocationAttribute allows task authors to specify whether the tool is located in the framework directory (eg. C:\WINDOWS\Microsoft.NET\Framework\v1.1.4432) or the SDK directory (eg. C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1) without actually having to deal with the complexity of knowing the actual path to these directories (for each supported framework).

In NAnt 0.86, we've taken this one step further. Each defined framework now has a (ordered) list of directories that can be scanned to locate a framework tool. The list of directories can be easily tuned for each framework by modifying the <tool-paths> nodes in the NAnt configuration file.

An example of such a node for the Mono 3.5 profile:

    <tool-paths>
        <directory name="${path::combine(prefix, 'lib/mono/3.5')}" />
        <directory name="${path::combine(prefix, 'lib/mono/2.0')}" />
        <directory name="${path::combine(prefix, 'lib/mono/1.0')}" />
    </tool-paths>
                

The directories configured in the <tool-paths> node of the current target framework will be scanned in the order in which they are defined.

The tool paths are implicitly used when a given tool cannot be located on the location specified by the ProgramLocationAttribute. As such, this only applies to tasks deriving from ExternalProgramBase.

To expose this functionality to build authors, we've added a framework::get-tool-path function that can be used to search for a given tool.

For example:

    <exec program="${framework::get-tool-path('gacutil.exe')}" managed="strict">
        <arg value="/i" />
        <arg file="Cegeka.HealthFramework.dll" />
    </exec>
                
Strict execution

Introduced support for forcing a managed application to run on the currently targeted CLR.

This was previously only possible by modifying the <startup> section of the application configuration file or by using constructs specific to each CLR (eg. using COMPLUS_VERSION environment variable for the MS CLR), which made build scripts non-portable.

Developers extending NAnt, can now control this by setting the Managed property for tasks deriving from ExternalProgramBase.

For build authors, forcing a managed application to run on a specific version of a CLR can be done by setting the "managed" attribute of <exec> to strict.

For example:

    <exec program="nunit-console.exe" managed="strict">
        <arg value="/noshadow" />
        <arg file="Cegeka.HealthFramework.Tests.dll" />
    </exec>
                
.NET Framework 3.5

Support for targeting .NET Framework 3.5 and Mono 3.5 Profile is now available.

Note: this does not apply to the <solution> task.

Silverlight 2.0

Added experimental support for targeting Silverlight 2.0 and Moonlight 2.0.

Note: this does not apply to the <solution> task.

Types

<patternset>

Defines a set of patterns, mostly used to include or exclude certain files.

Patterns can be grouped to sets, and later be referenced by their id.

For example:

    <patternset id="binaries">
        <include name="bin/**/*" />
        <exclude name="bin/*.tmp" />
    </patternset>

    <patternset id="docs">
        <include name="requirements/**/*" />
        <exclude name="design/**/*.doc" />
    </patternset>

    <patternset id="client.sources">
        <include name="client/**/*.cs" />
        <exclude name="client/**/*.vb" />
    </patternset>

    <patternset id="server.sources">
        <include name="server/**/*.cs" />
        <exclude name="server/**/*.vb" />
    </patternset>

    <patternset id="sources">
        <patternset refid="client.sources" />
        <patternset refid="server.sources" />
    </patternset>

    <target name="deploy">
        <copy todir="${dist.path}">
            <fileset basedir="${build.path}">
                <patternset refid="binaries" />
                <patternset refid="docs" />
                <patternset refid="sources" />

                <exclude name="**/*.sdf" />
            </fileset>
        </copy>
    </target>
                

Changes

Core

Performance

Initial start-up time and project initialization have been reduced dramatically by lazy configuration of supported target frameworks.

Framework support

.NET Compact Framework 2.0

Compiler options that were introduced in .NET Framework 2.0 are now also available when targeting .NET Compact Framework 2.0.

Tasks

<al>
<csc>
<exec>
<jsc>
<vbc>
<vjc>

Third-Party

#ziplib

Types

<assemblyfileset>

The reference assemblies of a given target framework are no longer limited to the assemblies in, what is known as, the framework assembly directory.

Instead, these are now defined using one or more <reference-assemblies> filesets in the <framework> node of the NAnt configuration file.

<fileset>

Added a "casesensitive" attribute to control whether pattern matching must be case-sensitive.

The default is true on Unix and false on on other platforms.

0.85 (October 14, 2006)

Bug fixes

Framework support

.NET Compact Framework 2.0

Functions

file::is-assembly

Tasks

<aximp>
<csc>
<regen>
<solution>
<unzip>

Changes

Tasks

<tlbimp>
<vbc>

0.85-rc 4 (June 2, 2006)

Framework support

Breaking changes

Tasks

<delete>

Bug fixes

Core

XmlLogger

Filters

<replacetokens>

Tasks

<cl>
<rc>
<script>
<solution>

Additions

Tasks

<regasm>

Changes

Core

log4net
MailLogger
Define types in task containers.

Global types can now be (re)defined in task containers (such a <if> , <foreach>).

For example:

    <project name="container-type" default="build">
        <if test="${platform::is-win32()}">
            <fileset id="sources">
                <include name="**/*.cs" />
                <!-- exclude Unix-specific classes -->
                <exclude name="**/Unix/*.cs" />
            </fileset>
        </if>
        <if test="${platform::is-unix()}">
            <fileset id="sources">
                <include name="**/*.cs" />
                <!-- exclude Win32-specific classes -->
                <exclude name="**/Win32/*.cs" />
            </fileset>
        </if>
        <target name="build">
            <csc output="IvsController.dll">
                <sources refid="sources" />
                <references>
                    <include name="System.dll" />
                    <include name="System.Data.dll" />
                    <include name="System.Xml.dll" />
                </references>
            </csc>
        </target>
    </project>
                

Up until now, only tasks could be executed in these containers.

Tasks

<csc>
<jsc>
<link>
<nunit2>
<unzip>
<vbc>
<vjc>
<zip>

Types

<arg>

0.85-rc 3 (April 16, 2005)

Breaking changes

Tasks

<nant>

Bug fixes

Core

XML Schema

Tasks

<copy> / <move>
<link>
<nant>
<ndoc>
<resgen>
<script>
<servicecontroller>
<call>
<solution>

Types

<fileset>

Changes

Core

MailLogger
Response File
XmlLogger

Tasks

<csc> / <vbc> / <vjc>
<lib>
<midl>

Developer information

API

FileSetAttribute

The NAnt.Core.Attributes.FileSetAttribute is obsolete. Task developers should use the NAnt.Core.Attributes.BuildElementAttribute instead:

For example:

    [FileSetBuildElement("fileset")]
    public FileSet CopyFileSet {
        get { return _fileset; }
        set { _fileset = value; }
    }
                

0.85-rc 2 (February 12, 2005)

General changes

Building NAnt
License

Bug fixes

Core

XML Schema

Functions

target::get-current-target()

Tasks

<cl>
<mail>
<midl>
<solution>
<style>
<sysinfo>

Additions

Tasks

<gunzip>
<setenv>

Types

<categories>

Changes

Expressions

Data Type support

Tasks

<al>
<cl>
<csc>
<lc>
<exec>
<link>
<mail>
<ndoc>
<nunit2>
<resgen>
<solution>
<style>

Types

<import>

0.85-rc 1 (November 28, 2004)

Framework support

Breaking changes

General changes

Commandline changes

New Tasks

<aximp>

<cvs-pass>

<cvs-changelog>

<cvs-export>

<cvs-tag>

<ilasm>

<ildasm>

<loadfile>

<tar>

Task changes

<asminfo>

<attrib>

<available>

<cl>

<csc>

<copy>

<cvs>

<exec>

<get>

<jsc>

<license>

<link>

<move>

<nant>

<ndoc>

<nunit>

<nunit2>

<regex>

<resgen>

<script>

<solution>

<sysinfo>

<vbc>

<vjc>

<xmlpeek> / <xmlpoke>

<zip> / <unzip>

New types

<assemblyfileset>

<warnaserror>

Type changes

<fileset>

Developer information

0.84 (December 26, 2003)

Task changes

<xmlpeek>

<xmlpoke>

0.84-rc 2 (December 21, 2003)

General changes

Task changes

<solution>

<xmlpeek>

<xmlpoke>

0.84-rc 1 (December 6, 2003)

Breaking changes

Some existing build scripts may stop working now or in the next release due to the following changes:

General changes

New Tasks

<asminfo>

<servicecontroller>

<delay-sign>

<mc>,<rc> and <midl>

<xmlpeek>

<xmlpoke>

Task changes

<call>

<cl>

<copy>

<csc>

<cvs-checkout>

<cvs-update>

<echo>

<fail>

<get>

<if>

<include>

<jsc>

<mail>

<move>

<nant>

<nantschema>

<ndoc>

<nunit2>

<property>

<resgen>

<solution>

<style>

<touch>

<vbc>

<vjc>

<zip>

API changes

0.8.3 (September 28, 2003)

User-visible changes

0.8.3-rc3 (August 29, 2003)

User-visible changes

0.8.3-rc2 (July 28, 2003)

User-visible changes

0.8.3-rc1 (July 10, 2003)

User-visible changes

API changes

Command-line client changes

Task changes

<exec>

<vjc>

<jsc>

<csc>

<nantschema>

<mcs>

<nant>

<copy>

<if>

<cl> and <link>

<fileset>

<mail>

0.8.2 (April 24, 2003)

0.8.2-rc3 (April 17, 2003)

0.8.2-rc2 (April 12, 2003)

0.8.2-rc1 (April 12, 2003)

0.8.1 (February 21, 2003)

0.7.9 (June 11, 2002)

0.7.749 (January 19, 2002)

0.6.0 (September 18, 2001)

0.5.0 (August 22, 2001)

0.1.5 (July 22, 2001)

0.1.4 (July 19, 2001)

0.1.3 (July 18, 2001)

0.1.2 (July 16, 2001)

0.1.1 (July 5, 2001)