Nicky40
Nicky40

Reputation: 35

Basic Nant task

I'm working on creating a simple Nant script that will utilize the assemblyname::get-version function which is documented here: http://nant.sourceforge.net/release/0.85/help/functions/assemblyname.get-version.html

I'm getting a failure "Unknown function 'version::get-major-version'. The .dll is indeed present in the directory that I'm running nant. Which I'm doing so by opening up the cmd prompt and cd'ing to the directory and using the command 'nant'

Any help is appreciated!

<target name="updater">

    <echo message = "Hello!" />
    <echo message="${version::get-major-version(assemblyname::get-version(assemblyname::get-assembly-name('nunit.util.dll')))}" />


</target>

Upvotes: 0

Views: 564

Answers (1)

The Chairman
The Chairman

Reputation: 7187

The documentation of assemblyname::get-version contains a bug. If you take a look at the documentation of version functions you will find out it should be version::get-major instead of version::get-major-version.

<echo message="${version::get-major(assemblyname::get-version(assemblyname::get-assembly-name('nunit.util.dll')))}" />

Upvotes: 1

Related Questions