I think the last NAnt / NAntContrib uses .NET 3.5 by default, so you have to change it to 4.0. To handle this property, there is the NAnt ( <property name="nant.settings.currentframework" value="net-4.0" />) property , which should be located at the top of the NAnt assembly file.
Then you need to go into your NAnt configuration file and add 4.0 node so that NAnt (and with the extension NantContrib) knows about the new CLR version.
source
share