Ambiguous match found Crashing VS2008 in a Web project

Ambiguous match found Crashing VS2008 in a Web project

Old forum URL:

jcourtney posted on Sunday, February 13, 2011

Anyone ever get this with a CSLA collection and have VS2008 design time crash?  It seems to be coming from the CSLADatasource (maybe?) when added to a GridView in ASP.NET.  Sometimes fails  when assigning the CSLA datasource to the GridView with "Can't assign DatasourceID" other times draws the Grid View then crashes VS later when the control is selected in design.  At times, will run ok without error and display the collection in the gridview.  However, will always crash once datasource is assigned and GridView selected at design.  I'm using CSLA  Not much found with Google or the Forums.  I've tried with R/O collections and Editable same issues.  Here is a stack trace, but I'm not seeing much to help.

System.Reflection.AmbiguousMatchException was unhandled
  Message="Ambiguous match found."
       at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers)
       at System.Type.GetMethod(String name)
       at Csla.Web.Design.CslaDesignerDataSourceView.get_CanDelete() in C:\d-drive\project\dotnet\CSLA\cslacs\Csla\Web\Design\CslaDesignerDataSourceView.cs:line 145
       at System.Web.UI.Design.WebControls.GridViewDesigner.get_ActionLists()
       at System.ComponentModel.Design.ComponentDesigner.CDDesignerCommandSet.GetCommands(String name)
       at System.ComponentModel.Design.DesignerCommandSet.get_ActionLists()
       at System.Web.UI.Design.WebFormsDesignerActionService.GetComponentDesignerActions(IComponent component, DesignerActionListCollection actionLists)
       at Microsoft.Web.Design.WebFormDesigner.WebDesignerActionService.GetComponentDesignerActions(IComponent component, DesignerActionListCollection actionLists)
       at System.ComponentModel.Design.DesignerActionService.GetComponentActions(IComponent component, ComponentActionsType type)
       at System.ComponentModel.Design.MenuCommandService.EnsureVerbs()
       at System.ComponentModel.Design.MenuCommandService.get_Verbs()
       at System.Windows.Forms.PropertyGrid.DisplayHotCommands()
       at System.Windows.Forms.PropertyGrid.Refresh(Boolean clearCached)
       at System.Windows.Forms.PropertyGrid.SelectViewTabButton(ToolStripButton button, Boolean updateSelection)
       at System.Windows.Forms.PropertyGrid.OnViewTabButtonClick(Object sender, EventArgs e)
       at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
       at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
       at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
       at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
       at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ToolStrip.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

jcourtney replied on Sunday, February 13, 2011

More info...

If I load VS2008 with the CslaDataSource Type Name set to the Editable Collection, then no crash.  (If I then change to the R/O Collection no crash during that session.)  However, if VS2008 reloaded with CslaDataSource still set to R/O Collection then crash.  *Note, I'm not changing the underlying B/O it is always R/O list.  I'm only changing the Type Name of the CslaDataSource.  Here are the definitions of the R/O and Editable Lists:




public partial class RoundInfoCollection : ReadOnlyListBase<RoundInfoCollection, RoundInfo>



public partial class RoundCollection : BusinessListBase<RoundCollection, Round>

Round and RoundInfo have their own base classes, but the same fields are in each.

This is really ponderous.



 I'm just leaving the CslaDataSource Type Name set to the Editable Collection for now as a work around...  Runtime doesn't seem to be a problem with this.


Copyright (c) Marimer LLC