This error can occur if the application model contains different BO Models with the same Caption and is visible in dashboards.
Type: ArgumentException
Message: An item with the same key has already been added.
Data: 0 entries
Stack trace:
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at DevExpress.ExpressApp.Dashboards.Web.DataSourceStorage…ctor()
at DevExpress.ExpressApp.Dashboards.Web.DashboardsAspNetModule.get_DataSourceStorage()
at DevExpress.ExpressApp.Dashboards.Web.DashboardsAspNetModule.Application_DetailViewCreated(Object sender, DetailViewCreatedEventArgs e)
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at DevExpress.ExpressApp.XafApplication.OnDetailViewCreated(DetailView view)
at DevExpress.ExpressApp.XafApplication.CreateDetailView(IObjectSpace objectSpace, String detailViewID, Boolean isRoot, Object obj)
at DevExpress.ExpressApp.XafApplication.CreateDetailView(IObjectSpace objectSpace, Object obj, View sourceView)
at DevExpress.ExpressApp.Dashboards.Web.WebEditDashboardController.ShowDesignerAction_CustomizePopupWindowParams(Object sender, CustomizePopupWindowParamsEventArgs e)
at DevExpress.ExpressApp.Actions.CustomizePopupWindowParamsEventHandler.Invoke(Object sender, CustomizePopupWindowParamsEventArgs e)
at DevExpress.ExpressApp.Actions.PopupWindowShowAction.GetPopupWindowParams()
at DevExpress.ExpressApp.Web.PopupWindowManager.GetPopupWindow(PopupWindowShowAction action)
at DevExpress.ExpressApp.Web.Templates.ActionContainers.Menu.PopupWindowActionMenuActionItem.ExecuteAction(ASPxMenuBase menu)
at DevExpress.ExpressApp.Web.Templates.ActionContainers.ActionContainerHolder.ExecuteMenuItem(IList`1 items, String itemName)
at DevExpress.ExpressApp.Web.Templates.XafCallbackManager.ProcessAction(String parameter)
at DevExpress.ExpressApp.Web.Templates.XafCallbackManager.callbackControl_Callback(Object source, CallbackEventArgs e)
at DevExpress.Web.ASPxCallback.OnCallback(CallbackEventArgs e)
at DevExpress.Web.ASPxCallback.RaiseCallbackEvent(String eventArgument)
at DevExpress.Web.ASPxWebControl.System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent(String eventArgument)
InnerException is null
Attached is a sample project demonstrating the issue.
A temporary workaround is either to make captions different or remove the VisibleInDashboardsAttribute from classes that are not required in dashboards.