Re: [NAnt-users] parsing version string
Thank you. That was my main problem, which allowed me to find other problems. The function call is get-major (as opposed to get_major, which I originally had). Also, the parameter to these functions needs to be a System.Version object and not a string. So the syntax to get just the major portion of the version string property looks like: property name=partNumberMajorInt value=${version::get-major(version::parse(version))} / echomajor is ${partNumberMajorInt}/echo Beth Re: [NAnt-users] parsing version string Steve Kapinos Sun, 01 Feb 2009 05:34:49 -0800 property name=partNumberMajor value=version::get_major(${version}) / is using wrong syntax.. that's why you are not getting the function substitution you are expecting should be like value=${version::get_major(version)} since it's inside the ${ } already, it will lookup unquoted text as variables or functions. If you wanted to use a string in there, use a quoted string inside the () --- This email and any files transmitted with it are confidential proprietary to Systems and Software Enterprises, Inc. (dba IMS). This information is intended solely for the use of the individual or entity to which it is addressed. Access or transmittal of the information contained in this e-mail, in full or in part, to any other organization or persons is not authorized. --- -Original Message- From: Beth Hechanova [mailto:bhechan...@imsco-us.com mailto:bhechan...@imsco-us.com ] Sent: Fri 1/30/2009 8:55 PM To: nant-users@lists.sourceforge.net Subject: [NAnt-users] parsing version string Hi, I'm trying to parse my version property to get the individual elements (major, minor, iteration, ...). My end goal is to take the information in the version in a format of 1.2.3.4 and turn it into a string that looks like 010203 (takes each of the major, minor, iteration and pad-lefts to a length of 2 with the zero char). I have a property called ${version} in the format of 1.2.3.4. I've been trying to use the version::get_major() function, but I must be using it wrong as I can't seem to extract the major number from the version. I'm trying to create another property: property name=partNumberMajor value=version::get_major(${version}) / echomajor is ${partNumberMajor}/echo And all I get back is [echo] major is version::get_major(1.0.1.34} Then I found the version::parse() function and thought maybe I should be using that to parse create a Version to pass to get_major(). That did not seem to work either, even if I hard coded a string for my version: echomajor version is version::get_major(version::parse(1.2.3.4))/echo Am I using these functions incorrectly? Thanks, Beth -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword___ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users
Re: [NAnt-users] msi task - 'cabarc' failed to start
I have been able to resolve this issue by downloading the NAnt and NAntContrib nightly builds from 1/30/09. (and also by downloading the Cabinet SDK, which I originally did not have). Thanks to Gert for his help. Beth [NAnt-users] msi task - 'cabarc' failed to start Beth Hechanova Wed, 28 Jan 2009 10:28:35 -0800 Hi, I saw a thread with the same subject approx a year ago in the mail archive, but I did not see any resolution. I am having the same exact problem. At the end of this email is the output from running the msi task from my nant script. I have not done anything with setting a path (either env variable or within the nant script itself). At this time, my msi task is very simple - I only have sourcedir defined as the directory that contains the files to put into the installer, and output defined to be the name of the msi installer. My application is a VS2008 solution built on .net 3.5 framework. Did the person with this same problem ever get it figured out? Are people able to successfully use the msi task with nant? If so, did you have to do some special configuration to get it to work? Thanks, Beth Build Error : C:\content\ContentTrunk\ContentManagementTool\srcnant Distribute NAnt 0.86 (Build 0.86.2898.0; beta1; 12/8/2007) Copyright (C) 2001-2007 Gerry Shaw http://nant.sourceforge.net http://nant.sourceforge.net Buildfile: file:///C:/content/ContentTrunk/ContentManagementTool/src/ContentManagem entTool.build Target framework: Microsoft .NET Framework 3.5 Target(s) specified: Distribute Distribute: [msi] Building Installer Database 'C:/BuildArea/ContentManagementTool/Distribute/ContentManagementTool.msi '. [msi] Compressing Files... [exec] Starting 'cabarc (-r N C:/BUILDA~1/CONTEN~1/Publish/\ContentManagementTool.cab *)' in 'C:\Documents and Settings\user\Temp\tmpC2C.tmp' BUILD FAILED C:\content\ContentTrunk\ContentManagementTool\src\ContentManagementTool. build(176,4): Unable to build Installer database 'C:/BuildArea/ContentManagementTool/Distribute/ContentManagementTool.msi '. C:\content\ContentTrunk\ContentManagementTool\src\ContentManagementTool. build(176,4): Error creating cab file. 'cabarc' failed to start. The system cannot find the file specified Total time: 1 seconds. --- This email and any files transmitted with it are confidential proprietary to Systems and Software Enterprises, Inc. (dba IMS). This information is intended solely for the use of the individual or entity to which it is addressed. Access or transmittal of the information contained in this e-mail, in full or in part, to any other organization or persons is not authorized. --- -- Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com___ NAnt-users mailing list NAnt-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-users