Hi
I have been working on a project using the XAF framework, focusing on the Web aspect of the project, although the windows and mobile projects are already part of the solution, i now need to get the windows project working however when i load the project i am presented with the "An item with the same key has already been added", i am unsure as to why i have this problem, if i had accidentally used the same key (although i can not see a duplicate) then would the web project not also present the same problem?
I have not made any changes to the Windows application model, however if i hide all of the navigation items the error does not appear, but of course i can not navigate/use my application.
FYI - after i click OK on the error message if i attempt to click on any of the navigation items such as My Details then i am again presented with the error message and the required view is not displayed.
Also the Mobile application works fine.
Can you point me in the necessary direction so that i can resolve this issue
Thanks
Andrew
Error Message Box:
C#An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at DevExpress.ExpressApp.Win.Templates.Bars.ActionControls.BarLinkActionControlContainer.AddActionControl(IActionControl actionControl)
at DevExpress.ExpressApp.Win.Templates.Bars.ActionControls.BarLinkActionControlContainer.AddSimpleActionControl(String actionId)
at DevExpress.ExpressApp.Templates.ActionControls.ActionControlContainerManager.AddActionControl(ActionBase action, IActionControlContainer container)
at DevExpress.ExpressApp.Templates.ActionControls.ActionControlContainerManager.AddActionControlsToContainer(IActionControlContainer container, String actionCategory)
at DevExpress.ExpressApp.SystemModule.ActionControlsSiteController.AddActionControlsToContainers(IActionControlsSite site, IEnumerable`1 actions, IModelActionToContainerMapping actionToContainerMapping)
at DevExpress.ExpressApp.SystemModule.ActionControlsSiteController.Frame_TemplateChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at DevExpress.ExpressApp.Frame.OnTemplateChanged()
at DevExpress.ExpressApp.Win.WinWindow.OnTemplateChanged()
at DevExpress.ExpressApp.Frame.SetTemplate(IFrameTemplate val)
at DevExpress.ExpressApp.Frame.CreateTemplate()
at DevExpress.ExpressApp.Win.WinWindow..ctor(XafApplication application, TemplateContext context, ICollection`1 controllers, Boolean isMain, Boolean activateControllersImmediately)
at DevExpress.ExpressApp.Win.WinApplication.CreateWindowCore(TemplateContext context, ICollection`1 controllers, Boolean isMain, Boolean activateControllersImmediately)
at DevExpress.ExpressApp.XafApplication.CreateWindow(TemplateContext context, ICollection`1 controllers, Boolean createAllControllers, Boolean isMain, View view)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateWindow(ShowViewParameters parameters, ShowViewSource showViewSource, Boolean isMain)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewInInspector(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.ShowViewInNewWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewInCurrentWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.ShowViewStrategyBase.ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.ShowViewStrategyBase.ShowView(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Frame.ProcessActionCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Win.WinWindow.ProcessActionCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Frame.ShowViewAction_ProcessCreatedView(Object sender, ActionBaseEventArgs e)
at DevExpress.ExpressApp.Actions.ActionBase.OnProcessCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Actions.ActionBase.ExecuteCore(Delegate handler, ActionBaseEventArgs eventArgs)
Error message from eXpressAppFramework.log
C#15.01.18 09:52:15.594 CurrentObject: Admin
15.01.18 09:52:15.609 WinApplication.CreateWindowCore.activateControllersImmediately: True
15.01.18 09:52:15.611 Window.activateControllersImmediately: True
15.01.18 09:52:15.612 WinWindow.activateControllersImmediately: True
15.01.18 09:52:15.630 Frame.set_Template: old value - null, new value - DevExpress.ExpressApp.Win.Templates.Ribbon.DetailRibbonFormV2
ProjectEve_XAF.Win.exe Error: 0 : 15.01.18 09:52:15.641 ================================================================================
The error occurred:
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 System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at DevExpress.ExpressApp.Win.Templates.Bars.ActionControls.BarLinkActionControlContainer.AddActionControl(IActionControl actionControl)
at DevExpress.ExpressApp.Win.Templates.Bars.ActionControls.BarLinkActionControlContainer.AddSimpleActionControl(String actionId)
at DevExpress.ExpressApp.Templates.ActionControls.ActionControlContainerManager.AddActionControl(ActionBase action, IActionControlContainer container)
at DevExpress.ExpressApp.Templates.ActionControls.ActionControlContainerManager.AddActionControlsToContainer(IActionControlContainer container, String actionCategory)
at DevExpress.ExpressApp.SystemModule.ActionControlsSiteController.AddActionControlsToContainers(IActionControlsSite site, IEnumerable`1 actions, IModelActionToContainerMapping actionToContainerMapping)
at DevExpress.ExpressApp.SystemModule.ActionControlsSiteController.Frame_TemplateChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at DevExpress.ExpressApp.Frame.OnTemplateChanged()
at DevExpress.ExpressApp.Win.WinWindow.OnTemplateChanged()
at DevExpress.ExpressApp.Frame.SetTemplate(IFrameTemplate val)
at DevExpress.ExpressApp.Frame.CreateTemplate()
at DevExpress.ExpressApp.Win.WinWindow..ctor(XafApplication application, TemplateContext context, ICollection`1 controllers, Boolean isMain, Boolean activateControllersImmediately)
at DevExpress.ExpressApp.Win.WinApplication.CreateWindowCore(TemplateContext context, ICollection`1 controllers, Boolean isMain, Boolean activateControllersImmediately)
at DevExpress.ExpressApp.XafApplication.CreateWindow(TemplateContext context, ICollection`1 controllers, Boolean createAllControllers, Boolean isMain, View view)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateWindow(ShowViewParameters parameters, ShowViewSource showViewSource, Boolean isMain)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.CreateInspectorWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewInInspector(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.WinShowViewStrategyBase.ShowViewInNewWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewInCurrentWindow(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.ShowViewStrategyBase.ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Win.MdiShowViewStrategy.ShowViewCore(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.ShowViewStrategyBase.ShowView(ShowViewParameters parameters, ShowViewSource showViewSource)
at DevExpress.ExpressApp.Frame.ProcessActionCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Win.WinWindow.ProcessActionCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Frame.ShowViewAction_ProcessCreatedView(Object sender, ActionBaseEventArgs e)
at DevExpress.ExpressApp.Actions.ActionBase.OnProcessCreatedView(ActionBaseEventArgs e)
at DevExpress.ExpressApp.Actions.ActionBase.ExecuteCore(Delegate handler, ActionBaseEventArgs eventArgs)
InnerException is null