Gordon, Can you send me a self-containing repro for this issue ?
Thanks ! Gert >-----Original Message----- >From: Gordon, John [mailto:[EMAIL PROTECTED] >Sent: Friday, September 30, 2005 07:21 PM >To: nant-developers@lists.sourceforge.net >Subject: [nant-dev] Bug Found in Vb6 Task > >This is regardin Bug 1082302: >https://sourceforge.net/tracker/?func=detail&atid=474851&aid=1082302&gro >up_id=54790 > >The Major version number is in hex, not ushort. This causes an error >when parsing a major version number into ushort. > >Offending line in NAnt.Contrib.Tasks.vb6.VB6GetTypeLibFile(): > >tmpMajor = (ushort) double.Parse(parts[0], >CultureInfo.InvariantCulture); //Error when parsing "3f.0" > >And the error produced: > >INTERNAL ERROR > >System.FormatException: Input string was not in a correct format. > at System.Number.ParseDouble(String s, NumberStyles style, >NumberFormatInfo info) > at System.Double.Parse(String s, NumberStyles style, IFormatProvider >provider) > at NAnt.Contrib.Tasks.Vb6Task.VB6GetTypeLibFile(Guid guid, UInt16 >major, UInt16 minor16, UInt32 lcid) > at NAnt.Contrib.Tasks.Vb6Task.ParseProjectFile(String projectFile, >FileSet sources, FileSet references) > at NAnt.Contrib.Tasks.Vb6Task.ProjectNeedsCompiling(String >projectFile) > at NAnt.Contrib.Tasks.Vb6Task.NeedsCompiling() > at NAnt.Contrib.Tasks.Vb6Task.ExecuteTask() > at NAnt.Core.Task.Execute() > at NAnt.Core.Target.Execute() > at NAnt.Core.Project.Execute(String targetName, Boolean >forceDependencies) > at NAnt.Core.Project.Execute() > at NAnt.Core.Project.Run() > > >This is the regkey that was parsed at the time of error: > >Windows Registry Editor Version 5.00 > >[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{609A8CC4-244A-4C70-80D0-3D >2538850E60}] > >[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{609A8CC4-244A-4C70-80D0-3D >2538850E60}\3f.0] >@="XXX HI Logger" > >[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{609A8CC4-244A-4C70-80D0-3D >2538850E60}\3f.0\0] > >[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{609A8CC4-244A-4C70-80D0-3D >2538850E60}\3f.0\0\win32] >@="C:\\dev\\XXX_Exp_Config\\online\\consumer\\retail\\shared\\HiCOM\\dis >t\\XXXHILogger.dll" > >[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{609A8CC4-244A-4C70-80D0-3D >2538850E60}\3f.0\FLAGS] >@="0" > >[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{609A8CC4-244A-4C70-80D0-3D >2538850E60}\3f.0\HELPDIR] >@="C:\\dev\\XXX_Exp_Config\\online\\consumer\\retail\\shared\\HiCOM\\dis >t" > > > >Adding a NumberStyles argument to double.Parse() fixes the problem: > >tmpMajor = (ushort) >double.Parse(parts[0],System.Globalization.NumberStyles.AllowHexSpecifie >r, CultureInfo.InvariantCulture); > > >Thanks, > >John Gordon > ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ nant-developers mailing list nant-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nant-developers