0

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.

Richardissimo
  • 5,596
  • 2
  • 18
  • 36
Yousha Aleayoub
  • 4,532
  • 4
  • 53
  • 64

1 Answers1

0

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).

Richardissimo
  • 5,596
  • 2
  • 18
  • 36