My application works fine on the development PC, but it fails when I run it on the target PC.
The target runs XP (fully up to date), I have installed dotnetfx and Measurement Studio 8 (with the patch).
I use Visual C# 2005 Express.
I have used the Publish Wizard in Release configuration
When my application starts I get a messagebox saying there was an Unhandled exception, and two graphs in a window have red crosses on them. I can continue and the rest of the application works, including another window with graphs.
The exception dump:
************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
at UICM.ac.c(ComponentDrawArgsInternal )
at UICM.ac.DrawForeground(ComponentDrawArgsInternal args)
at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle , Boolean )
at NationalInstruments.Restricted.ControlElement.DrawChildren(ComponentDrawArgsInternal args, Rectangle clipRectangle)
at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle , Boolean )
at NationalInstruments.Restricted.ControlElement.DrawChildren(ComponentDrawArgsInternal args, Rectangle clipRectangle)
at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle , Boolean )
at NationalInstruments.Restricted.ControlElement.a(ComponentDrawArgsInternal , Rectangle )
at NationalInstruments.Restricted.ControlElement.Paint(PaintEventArgs e)
at NationalInstruments.UI.WindowsForms.ControlBase.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
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)
---------------------------
Could not include everything since message exceeds 5000 characters.