Hi, as in http://nant.sourceforge.net/release/latest/help/functions states version::get-build needs a version as parameter. Therefore you need to do a version::parse() before. In addition you need to encapsulate your version with ' to get a string.
value="${version::get-build(version::parse('1.0.17.0'))}" should work. If you want to get this info from an assembly you need following: <echo message="${version::get-major(assemblyname::get-version(assemblyname::get-assembly-name('nunit.framework.dll')))}" /> similar for ProductVersion: <echo message="${version::get-major(fileversioninfo::get-product-version(fileversioninfo::get-version-info('nunit.framework.dll')))}" /> hth Dogu Am 18.10.2012 18:04, schrieb Thuc D. Nguyen: > Hello, > > I cannot get the NAnt function *version::get-build* to retrieve the > build number. Below is what I use inside my NAnt script and what follows > is the error message. I'm using NAnt 0.92. > Does anyone have any idea on how to make this work? > > <property name="BuildNumber" value="${version::get-build(1.0.17.0)}" /> > <echo message="${BuildNumber}" /> > > BUILD FAILED > > MyNAnt.build(259,6): > ',' expected. > Expression: ${version::get-build(1.0.17.0)} > ^ > Thanks, > TDN > -- The answer to the great question of life, the universe and everything is 42 (Douglas Adams) ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_sfd2d_oct _______________________________________________ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users