How to check NAnt version inside a NAnt script to display error?
For example my NAnt script works with NAnt version +0.92, so I need to display error if lesser version is being used by the user.
How to check NAnt version inside a NAnt script to display error?
For example my NAnt script works with NAnt version +0.92, so I need to display error if lesser version is being used by the user.
There is a default property called nant.version
which you can check against. This is now deprecated, you will see the rather verbose replacement in the warning message.
I don't know an easy way to enforce a minimum version check, but you could make something using the version functions, or write your own task
(it's not hard, using the Version
class in dot net to compare them).