Right Click exception on workflow designer.
-
vendredi 4 mai 2012 12:47
We are designing our workflow with Visual Studio 2011.
When we try to open context menu with menu with right click we get below exception :
------------------------
Workflow Designer
-------------------------
ArgumentException:
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 System.Activities.Presentation.Xaml.ObjectToSourceLocationMapping.UpdateSourceLocationToModelItemMapping(IEnumerable`1 modelItemsOnDesigner)
at System.Activities.Presentation.Xaml.ObjectToSourceLocationMapping.EnsureUpdated()
at System.Activities.Presentation.Debug.DebuggerService.EnsureSourceLocationUpdated()
at System.Activities.Presentation.Debug.DebuggerService.GetSourceLocationFromModelItem(ModelItem modelItem)
at System.Activities.Presentation.Debug.DebuggerService.get_SelectedLocation()
at System.Activities.Presentation.View.DesignerView.<InitializeMenuActions>b__14(WorkflowViewElement selection)
at System.Activities.Presentation.View.DesignerView.OnInsertBreakpointMenuLoaded(Object sender, RoutedEventArgs e)
at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
at MS.Internal.LoadedOrUnloadedOperation.DoWork()
at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget)
at System.Windows.Interop.HwndTarget.OnResize()
at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
-------------------------- Type modifié LeoTangModerator dimanche 13 mai 2012 06:12
Toutes les réponses
-
dimanche 6 mai 2012 09:47Modérateur
Hi,
Generally this exception is caused by specific Xaml file, could you please post the code of the Xaml file here? Thanks.
Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help. -
dimanche 6 mai 2012 14:42
It is long file (more than 1 mb) so I add it to skydrive
https://skydrive.live.com/?cid=44f63db1d9cbbab6&resid=44F63DB1D9CBBAB6!621&id=44F63DB1D9CBBAB6!621
Workflow service is "Loan.xamlx".
- Modifié Ugur KARATAS dimanche 6 mai 2012 14:44
-
mardi 8 mai 2012 10:28Modérateur
Hi,
Thanks for posting! Unfortunately, I can't load the activity in designer due to the custom assemblies. If you can reproduce this issue with a simple project, you can send it to me at: liangliang(dot)tang(at)hotmail(dot)com.
Leo Tang [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

