Hi all,
I’m not sure if this is the right forum to post this in, but here it is anyway. Please move it to the proper forum if it’s not.
Well, I have a huge vb.net project (about 120,000 lines) I wanted to convert to C#. Among many conversion tools on the web, one of them was the best since it converted it with no errors (or that’s what it told me). Now my project is fully converted with no compile errors at design time. It even runs correctly and it loaded the login form which connects to the database and asks for the username/password normally. But once I click the login button (which takes the user to the main form) it tries to load the main form and stops at:
InitializeComponent();
Error:
Value cannot be null.
Parameter name: dataSource
I must mention that the main form could not be loaded even at design time. It just shows the warning message:
To prevent possible data loss before loading the designer, the following errors must be resolved
And hers’s the exception details:
To see what’s happening I clicked on “Ignore and continue” and the form loaded but the main TabControl was empty with just few lines showing the same exception details mentioned above.
The main TabControl has many TabPages and DGVs and lots of bindingsources all done through the designer using one connection to a MySql database.
I spent the last two weeks learning the basics of C# but I got bored since it was all just basics (you know loops if conditions etc...) But now I decided to take a huge step and I was having a great hope that my project will work so I could learn C# in action to see how it does things comparing to vb.net but here I am
Thank you[/B]
I’m not sure if this is the right forum to post this in, but here it is anyway. Please move it to the proper forum if it’s not.
Well, I have a huge vb.net project (about 120,000 lines) I wanted to convert to C#. Among many conversion tools on the web, one of them was the best since it converted it with no errors (or that’s what it told me). Now my project is fully converted with no compile errors at design time. It even runs correctly and it loaded the login form which connects to the database and asks for the username/password normally. But once I click the login button (which takes the user to the main form) it tries to load the main form and stops at:
InitializeComponent();
Error:
Value cannot be null.
Parameter name: dataSource
I must mention that the main form could not be loaded even at design time. It just shows the warning message:
To prevent possible data loss before loading the designer, the following errors must be resolved
And hers’s the exception details:
Exception Details:
System.ArgumentNullException was unhandled
Message=Value cannot be null.
Parameter name: dataSource
Source=System.Windows.Forms
ParamName=dataSource
StackTrace:
at System.Windows.Forms.BindingContext.HashKey..ctor(Object dataSource, String dataMember)
at System.Windows.Forms.BindingContext.EnsureListManager(Object dataSource, String dataMember)
at System.Windows.Forms.BindingContext.UpdateBinding(BindingContext newBindingContext, Binding binding)
at System.Windows.Forms.Control.UpdateBindings()
at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
at System.Windows.Forms.Control.OnParentBindingContextChanged(EventArgs e)
at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
at System.Windows.Forms.Control.set_BindingContextInternal(BindingContext value)
at System.Windows.Forms.ContainerControl.get_BindingContext()
at System.Windows.Forms.Control.get_BindingContextInternal()
at System.Windows.Forms.Control.get_BindingContextInternal()
at System.Windows.Forms.Control.get_BindingContextInternal()
at System.Windows.Forms.Control.get_BindingContextInternal()
at System.Windows.Forms.Control.UpdateBindings()
at System.Windows.Forms.Control.OnBindingContextChanged(EventArgs e)
at System.Windows.Forms.ListControl.OnBindingContextChanged(EventArgs e)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ComboBox.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:
To see what’s happening I clicked on “Ignore and continue” and the form loaded but the main TabControl was empty with just few lines showing the same exception details mentioned above.
The main TabControl has many TabPages and DGVs and lots of bindingsources all done through the designer using one connection to a MySql database.
I spent the last two weeks learning the basics of C# but I got bored since it was all just basics (you know loops if conditions etc...) But now I decided to take a huge step and I was having a great hope that my project will work so I could learn C# in action to see how it does things comparing to vb.net but here I am
Thank you[/B]
Last edited by a moderator: