Invalid Cast Exception


Author
Message
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
I did an update to DevEx 7.3.6 today.  Everything seemed to be fine (no build errors...guess I shouldn't just go on that, huh?).  Then a user calls and alerts me to an error.  On her end it was the dreaded mscorlib error.  When I ran the same steps as she did I got this:

InvalidCastException
  Unable to cast object of type 'DevExpress.Utils.ImageCollectionStreamer' to type 'DevExpress.Utils.ImageCollectionStreamer'.

Source     : MicroFour StrataFrame Inherited UI

Stack Trace:
   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.BrowseDialogwindow.InitializeComponent()
   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.BrowseDialogwindow..ctor(BrowseDialog BrowseDialogSettings, Boolean PopulateOnShow)
   at MicroFour.StrataFrame.UI.Windows.Forms.DevEx.BrowseDialog.ShowDialog(Boolean PopulateOnShow)
   at Aspire.Sales.SalesOrders.cmdCustomerSearch_LinkClicked(Object sender, LinkLabelLinkClickedEventArgs e)
   at System.Windows.Forms.LinkLabel.OnLinkClicked(LinkLabelLinkClickedEventArgs e)
   at System.Windows.Forms.LinkLabel.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Label.WndProc(Message& m)
   at System.Windows.Forms.LinkLabel.WndProc(Message& msg)
   at System.Windows.Forms.Control.ControlNativewindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)
   at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

How would I prevent something like this from happening?  Everything builds fine, but the application will not run properly.  It is an assembly problem of some kind.  I am looking into it now.

Thanks for any help on this,
Bill

Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If you're still getting that issue, it might be that it's embedded in the source code.  When the .resx file (form resources) serializes an image stream like that, it saves off the assembly qualified type name of the type that was serialized, so the .resx file will most likely have the version in it.  You can sometimes fix this by getting the designer to reserialize it (by modifying the file and resaving it) or by opening the .resx file in the XML editor (right-click within the Solution Explorer and choose "Open With") and find all of the instances of 7.2.0.0 and replace them with 7.3.0.0 (or whatever version(s) you're converting to-from). 

Also, DevExpress might have a project conversion wizard which should take care of replacing the references within the .resx files, too.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search