locked
VS.Net WF Designer error - WorkflowViewState.IdRef duplicate value causes error An item with the same key has already been added. RRS feed

  • Question

  • When I have a project with a visually designed activity (A) referring another visually designed activity (B) which in turn references a code activity (C) (with an associated designer) causes this error.

    A has two B activities in it. And B has one C activity in it with an In argument assigned to it's property. When I right-click on either one of the activities in A it causes the exception "An item with the same key has already been added.".

    When I open the xaml for Activity A I can see the following error in it. Note the duplicate IdRef values.

    <local:NewWriteline DisplayName="NewWriteline1" sap2010:WorkflowViewState.IdRef="NewWriteline_1" Input="v1">

    <local:NewWriteline DisplayName="NewWriteline2" sap2010:WorkflowViewState.IdRef="NewWriteline_1" Input="v2">


    I have the full stack trace, a full sample solution (two projects) reproducing this bug. If you want to see these let me know I'd be more than happy to put the files somewhere or email them.

    I'd really appreciate some assistance on this. It's real pain to have to fix the xaml all the time.

    Friday, April 5, 2013 1:39 AM

Answers