Cannot get function version::get-build to work

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Cannot get function version::get-build to work

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

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nant-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Cannot get function version::get-build to work

Dominik Guder
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nant-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Nant.exe is crashing on Windows 2008 R2 64-Bit OS

Khairuddin Abdullah
Hi All:

I've installed Nant 0.91 on Windows 2008 R2 server 64-bit OS under x86. The registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP indicated that there're .Net Framework CDF, v2.0.50725, v3, v3.5, and v4 installed on the server.
I've noted in the Event Viewer logs that the Nant.exe has crashed a lot. Below is the specific error. Can any body tell me if any specific thing I need to do when installing Nant on a 64-bit OS? Is there any step-by-step installation guide out there that I can use to install Nant on a 64-bit OS to eliminate the crash? Thanks

-----
Faulting application name: NAnt.exe, version: 0.91.4312.0, time stamp: 0x4ea3713f
Faulting module name: KERNELBASE.dll, version: 6.1.7601.17651, time stamp: 0x4e211319
Exception code: 0xe0434352
Fault offset: 0x0000b9bc
Faulting process id: 0xd100
Faulting application start time: 0x01cdc612bbbc121c
Faulting application path: C:\Program Files (x86)\NAnt\nant-0.91\bin\NAnt.exe
Faulting module path: C:\Windows\syswow64\KERNELBASE.dll
Report Id: b00f9102-3297-11e2-b564-1cc1de1e2c4a

- <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
  <Provider Name="Application Error" />
  <EventID Qualifiers="0">1000</EventID>
  <Level>2</Level>
  <Task>100</Task>
  <Keywords>0x80000000000000</Keywords>
  <TimeCreated SystemTime="2012-11-19T22:23:05.000000000Z" />
  <EventRecordID>32770</EventRecordID>
  <Channel>Application</Channel>
  <Computer>xxxxxxx</Computer>
  <Security />
  </System>
- <EventData>
  <Data>NAnt.exe</Data>
  <Data>0.91.4312.0</Data>
  <Data>4ea3713f</Data>
  <Data>KERNELBASE.dll</Data>
  <Data>6.1.7601.17651</Data>
  <Data>4e211319</Data>
  <Data>e0434352</Data>
  <Data>0000b9bc</Data>
  <Data>d100</Data>
  <Data>01cdc612bbbc121c</Data>
  <Data>C:\Program Files (x86)\NAnt\nant-0.91\bin\NAnt.exe</Data>
  <Data>C:\Windows\syswow64\KERNELBASE.dll</Data>
  <Data>b00f9102-3297-11e2-b564-1cc1de1e2c4a</Data>
  </EventData>
  </Event>

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
NAnt-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nant-users
Loading...