NAnt ![]() |
NAnt Release Notes |
![]() |
<solution>
task).
<defines>
collection
are passed to the compiler, regardless of the value of the "if" and
"unless" attributes (bug
#1221945).
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.
/langversion
and /platform
commandline options of the C# compiler are now exposed as
attributes.
/keycontainer
and /keyfile
commandline options [Mono / .NET 2.0 or higher].
/platform
commandline option of the JScript.NET
compiler is now exposed using the "platform" attribute.
/platform
commandline option of the VB.NET
compiler is now exposed using the "platform" attribute. [.NET 2.0 or higher]
/keycontainer
and /keyfile
commandline options. [.NET 2.0 or higher]
/keycontainer
and /keyfile
commandline options.
<solution>
task.
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; } }
<solution>
task
doesn't support COM, OCX apps built in Visual C++ (bug
#1078641).
document()
function is not
considered to be relative to the base URI of stylesheet containing the function
call (bug
#1078896).
<nunit2>
task.
<csc>
task will target .NET 2.0. Previous versions of
NAnt would target .NET 1.0 by default.<arg>
element (used by, for example, the <exec>
task) would automatically add quotes for both "file" and "value" attributes in
the command line generated by the task. That automatic quoting has been removed
for "value" attributes (but not for "file" attributes). This change may break
build files that assume that both arguments specified using the "file" and
"value" attributes will automatically be quoted.<nunit2>
task been
updated to support
NUnit 2.2. Assemblies built using previous versions of NUnit should
either be rebuilt using
NUnit 2.2 or a
binding redirect should be configured in the application configuration
file of the test assembly.
XmlLogger
is now buffered until build has finished, and
XmlLogger
can now also be used as a listener.
<nowarn>
child element.
<warnaserror>
child
element. [.NET 2.0 or higher]<lib>
element is
obsolete, in favor of <lib>
child element on <references>
and <modules>
element.<cvs>
tasks.
<certificates>
elements.
lc.exe
commandline tool to compile license files whenever
available.
<fileset>
support
for specifiying build files to execute.
<nunit>
task has
been deprecated, and will be moved to NAntContrib
in a future release. NUnit 1.0 test assemblies will remain supported through
NAntContrib, but we strongly advise you to upgrade to NUnit 2.x.
<script>
task.<script>
task is now
supported on Mono.<script>
task will now also be scanned for functions and filters.
obj\<configuration>
directory relative to project directory. The compiled resource files will not
be removed when the task finishes, by doing this resource files will now only
be recompiled if the compiled resource file in the object directory is no
longer up-to-date. This matches the behaviour of VS.NET.
<nowarn>
child element. [.NET 2.0 or higher]
<warnaserror>
child
element. [.NET 2.0 or higher]<imports>
child
element, and deprecated "imports" attribute.<lib>
element is
obsolete, in favor of <lib>
child element on <references>
and <modules>
element.
<nowarn>
child element. [.NET 2.0 or higher]<lib>
element is
obsolete, in favor of <lib>
child element on <references>
and <modules>
element.<fileset>
for
managing assembly files.
<includes>
and <excludes>
elements in favor of <include>
and <exclude>
elements.<includesList>
element in favor of <includesfile>
.<excludesfile>
element.
Task.LogPrefix
property has been deprecated. Messages that are
written to build log by a given task, will now automatically get prefixed with
the task name. This behaviour can be disabled by the new -e[macs]
commandline
option.
XmlLogger
will now correctly handle null-characters in the build output.<resources>
element
of the compiler tasks.
filename
attribute was renamed to file
to improve
consistency with other tasks.
filename
attribute was renamed to file
to improve
consistency with other tasks.
Some existing build scripts may stop working now or in the next release due to the following changes:
<call>
task now executes the given target and all its
dependencies. In previous versions of NAnt only the target itself would be
executed.todir
attribute of the <copy>
and <move>
tasks no longer defaults to the project base directory. It must now be set
explicitly.force
attribute of the <call>
task has been
deprecated and has no longer any effect. The <call>
task
will now always execute the specified target, regardless of the fact that this
target has already been executed before.files
and attachments
attributes of
the <mail>
task have been replaced by fileset support.nant.onfailure
property would be executed when the build
fails. However, NAnt actually executed a target identified by the nant.failure
property (if available). This has now been corrected and the old syntax (nant.failure
)
is now deprecated.<param>
element of the <style>
task
has been deprecated in favor of a <parameters>
collection
with nested <parameter>
elements. The <parameter>
element now also supports a namespaceuri
, if
and unless
attribute. See the documentation of the <style>
task for
more information.Plain
formatter was implicitly
added in the <nunit2>
task. In NAnt 0.8.4, the Plain
formatter will only implicitly be added if no other formatters are specified.
In this case, a warning message will be output to the build log encouraging
build authors to explicitly add this formatter for forward compatibility. In
future versions of NAnt, the Plain
formatter will no longer
implicitly be added.<param>
child element of the <style>
task has been deprecated in favor of a nested <parameters>
collection.
<csc>
, <jsc>
,
<vbc>
and <vjc>
tasks: when dynamixprefix
is set to "true" and prefix is set to the root namespace of the assembly for
the nested <resources>
element, the compiler tasks will now
compile resources with IDs matching these generated by VS.NET. Support for the
generation of satellite assemblies was also added to these tasks.<call>
task now executes the given target and all its
dependencies. In previous versions of NAnt only the target itself would be
executed.force
attribute of the <call>
task has been
deprecated and has no longer any effect. The <call>
task
will now always execute the specified target, regardless of the fact that this
target has already been executed before.
todir
attribute no longer defaults to the project base
directory. It must now be set explicitly.flatten
attribute to allow all matching files to be
copied to a single directory.
<lib>
element.
level
attribute to allow messages to be output with a
specific level.
httpproxy
attribute of the <get>
task is
deprecated, use the new <proxy>
child element instead.<credentials>
child element used for authenticating
the request with the Internet resource.ignoreerrors
attribute in favor of the failonerror
attribute.timeout
attribute to allow length of time to wait for a
response or the request to timeout to be specified.
<uptodatefiles
child element for uptodate fileset
support.<if uptodatefile="...">
now behaves as documented, meaning
that nested tasks will only be executed if the file specifies in the
uptodatefile attribute actually exists and the file specified in the uptodatefile
attribute is more recent or the same lastwritetime than the file(s) specifies
in the comparefile
attribute and <comparefiles>
fileset.
<lib>
element.
files
and attachments
attributes
have been replaced by fileset support.todir
attribute no longer defaults to the project base
directory. It must now be set explicitly.flatten
attribute to allow all matching files to
be moved to a single directory.
<properties>
child element.buildfile
is now a required attribute, which makes it harder to
accidently write an infinitely looping build.
<nantschema>
task does not generate the
correct XML Schema definition for collections and arrays. This tasks needs to
be updated. Please use with caution.
<ndoc>
task to using version 1.2 of NDoc.
<nunit2>
task to use version 2.1 of NUnit.Plain
formatter was implicitly
added. In NAnt 0.8.4, the Plain
formatter will only implicitly be
added if no other formatters are specified. In this case, a warning message
will be output to the build log encouraging build authors to explicitly add
this formatter for forward compatibility. In future versions of NAnt, the Plain
formatter will no longer implicitly be added.outputdir
attribute for <formatter>
element
to control the directory where the test result file will be stored (if the usefile
attribute is "true").
overwrite
attribute to the <property>
task
to control whether the value of the specified property should be overwritten
when the property already exists.<resgen>
task when
using a fileset.
<assemblyfolders>
fileset element that allows a
set of folders to be set, that should be searched to resolve assembly
references.includevsfolders
attribute was added to
control whether these folders should be searched for assembly references.<excludeprojects>
fileset that allows a set of
projects to be excluded.outputdir
attribute can now be specified, which overrides the
directory where compiled targets will be placed.<webmap>
element was added that maps URL's of web
projects to local path, thereby removing the need to configure the web server
to allow access to these project files.<param>
child element has been deprecated in
favor of a nested <parameters>
collection.
<lib>
element.
<lib>
element.
includeemptydirs
attribute to control whether empty
directories should be included in the generated zip file.
basedir
for fileset was specified.
basedir
of fileset is set to the root directory
of a drive in Windows.
ProgramLocationAttribute
that can be assigned to a task to
indicate that it wraps an executable that is part of either the .NET Framework
or the .NET Framework SDK, and have NAnt figure out the full path to the
executable using the framework settings in the NAnt configuration file.
FileSetAttribute
has been deprecated. The BuildElementAttribute
should be used instead.
FrameworkConfigurableAttribute
that can be assigned to a
task attribute to allow the default values of that attribute to be configured
from the framework configuration section in the NAnt configuration file for the
currently active framework.
<proxy>
and <credentials>
data
types that are used to provide proxy settings and authentication information
for tasks that connect to external resources (eg. the <get>
task).