Bugs item #1633586, was opened at 2007-01-11 23:43
Message generated for change (Comment added) made by drieseng
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1633586&group_id=31650

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Functions
Group: 0.85
Status: Closed
Resolution: Invalid
Priority: 5
Private: No
Submitted By: Chris Buffett (chris_buffett)
Assigned to: Nobody/Anonymous (nobody)
Summary: version::get-major() can't convert to System.Version

Initial Comment:
Using the following code, I get System.FormatException: Input string was not in 
a correct format.

<property name="version.string" value="" />
<xmlpeek file="${installer.codebase}\${installer.project.name}"
        xpath="/msi/[EMAIL 
PROTECTED]'Property']/row/td[text()='ProductVersion']/following-sibling::td[1]"
        property="version.string"
/>
                
<echo message="|${version.string}|" />
                
<property name="version" value="${version::parse('version.string')}" />

The echo task is outputting |4.0.1.0|, so it appears that ${version.string} is 
in the correct format (no extraneous white space).

Full exception trace:
Expression: ${version::parse('version.string')}
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---> System.FormatException: 
Input string was not in
a correct format.
   at NAnt.Core.ExpressionEvaluator.EvaluateFunction(String functionName, 
Object[] args)
   at NAnt.Core.ExpressionEvalBase.ParseValue()

----------------------------------------------------------------------

>Comment By: Gert Driesen (drieseng)
Date: 2007-01-12 08:57

Message:
Logged In: YES 
user_id=707851
Originator: NO

Correct. When you want to pass the value of a property to a function, you
should not enclose it in quotes.


----------------------------------------------------------------------

Comment By: Chris Buffett (chris_buffett)
Date: 2007-01-12 01:05

Message:
Logged In: YES 
user_id=1248307
Originator: YES

Update:
This looks to be due to the fact that there are single quote around the
property name. Removing them allowed the process to continue.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1633586&group_id=31650

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to