Workaround for BindingSource designer error

When working with a Windows.Forms application in Visual Studio 2005 (Whidbey), you may encounter a strange error when you try to open a form or control that has data binding using the new Bindingsource components.  The error usually reads like :


One or more errors encountered while loading the designer. The errors are listed below. Some errors can be fixed by rebuilding your project, while others may require code changes.


Type must be a type provided by the runtime. Parameter name: type 



at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at System.Windows.Forms.SecurityUtils.SecureCreateInstance(Type type, Object[] args)
at System.Windows.Forms.BindingSource.CreateBindingList(Type type)
at System.Windows.Forms.BindingSource.GetListFromType(Type type)
at System.Windows.Forms.BindingSource.ResetList()
at System.Windows.Forms.BindingSource.EnsureInnerList()
at System.Windows.Forms.BindingSource.System.ComponentModel.ISupportInitialize.EndInit()



An easy way to work around this problem is to close the form or control designer, open the data sources window, then open the form or control designer again.  The problem only occurs when you try to open a form or control designer and you haven’t had the Data Sources window open in that project since you last opened it.


So the solution is simple, just open the data sources window if you come across this error.

This entry was posted in 491, 493. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *