Dear WiX developers,
thank you very much for delivering this great piece of software.
I'd like to report the following:
Using any version from 3.0.3815 to the newest (currently 3.0.3907) I get
the following error message when trying to "dark" a msi package that has
been created using vs2005.
-----%<---------%<---------%<---------%<---------%<---------%<---------%
<---------%<---------%<---------%<----
[exec] Decompiling the Control table.
[exec] dark.exe : error DARK0001 : Unable to cast object of type
'System.Int32' to type 'System.String'.
[exec] Exception Type: System.InvalidCastException
[exec] Stack Trace:
[exec] at Microsoft.Tools.WindowsInstallerXml.ControlRow.get_X()
[exec] at
Microsoft.Tools.WindowsInstallerXml.Decompiler.DecompileControlTable(Tab
le table)
[exec] at
Microsoft.Tools.WindowsInstallerXml.Decompiler.DecompileTables(Output
output)
[exec] at
Microsoft.Tools.WindowsInstallerXml.Decompiler.Decompile(Output output)
[exec] at Microsoft.Tools.WindowsInstallerXml.Tools.Dark.Run(String[]
args)
-----%<---------%<---------%<---------%<---------%<---------%<---------%
<---------%<---------%<---------%<----
Version 3.0.3808 is the last one that works fine for me. I assume
something got broken or I am missing something...
The problem can be traced back to the following code (ControlRow.cs):
-----%<---------%<---------%<---------%<---------%<----
public string X
{
get { return (string)this.Fields[3].Data; }
set { this.Fields[3].Data = value; }
}
-----%<---------%<---------%<---------%<---------%<----
As a quick fix, you might want to consider using Convert.ToString()
instead of casting from object to string all over the place... On the
other hand, I'm not quite sure, whether this might result in a slight
loss of performance.
Drop me a line if you need additional information!
Kind regards,
Daniel
Logged In: YES
user_id=2040342
Originator: YES
This is a duplicate of bug #1911850. Sorry for that! Take it as some additional input... ;)
Logged In: YES
user_id=1939857
Originator: NO
I've received the same error in a different place, using 3.0.4123. For me, it occurs when decompiling the RadioButton table:
dark.exe : error DARK0001 : Unable to cast object of type 'System.Int32' to type 'System.String'.
Exception Type: System.InvalidCastException
Stack Trace:
at Microsoft.Tools.WindowsInstallerXml.Decompiler.DecompileRadioButtonTable(Table table)
at Microsoft.Tools.WindowsInstallerXml.Decompiler.DecompileTables(Output output)
at Microsoft.Tools.WindowsInstallerXml.Decompiler.Decompile(Output output)
at Microsoft.Tools.WindowsInstallerXml.Tools.Dark.Run(String[] args)
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 15 days (the time period specified by
the administrator of this Tracker).