locked
Exception Message: An item with the same key has already been added. Source Assembly: mscorlib.dll RRS feed

  • Question

  • Hi All,

     

    We are running TFS2010 on VS2010 Ultimate on 2003 server SP-2 with IE 8.

     

    Problem: Exception Message: An item with the same key has already been added. Source Assembly: mscorlib.dll

     

    While we try to move our test cases from MTM to Coded UI we get following error followed by restarting VS2010. It happened several times and we could not move our test cases from MTM to VS2010 at all therefore we can not deploy those test cases for unattended nightly execution. The full error message is given below:

     

    An unexpected error happened and Coded UI Test cannot recover from it.

    Exception Message: An item with the same key has already been added. Source Assembly: mscorlib.dll

     

     

    How do we get rid of this problem? Can you please help us with that? Thank you for reading and giving this post a thought.

     

    Thank you,

     

    RASRAS
    Monday, November 22, 2010 10:28 PM

Answers

  • Basically a solution can have n number of projects. If you see that one particular test script is throwing this error you can try to generate code for that script in a separate Coded UI Test project. In this way you are using a separate UIMap and hence this issue should not come.
    Tuesday, November 23, 2010 5:59 PM

All replies

  • If this is happening when you are trying to generate code from the MTM test case, it is a known issue and we will be fixing it in our future release.

    One workaround to overcome this can be if you try to have separate test project for the conflicting test case where you are seeing these error.

    Tuesday, November 23, 2010 6:43 AM
  • Hi Deepak,

    Thank you for quick reply. are you suggesting to create a new project with its solution folder? Please elaborate.

    Thank you,

    RASRAS

    Tuesday, November 23, 2010 2:24 PM
  • Basically a solution can have n number of projects. If you see that one particular test script is throwing this error you can try to generate code for that script in a separate Coded UI Test project. In this way you are using a separate UIMap and hence this issue should not come.
    Tuesday, November 23, 2010 5:59 PM
  • Hi Deepak,

    Thank you again so much for further clerifying. This makes much more sense now. I will give it a try and will update you accordingly.

    Thank you,

    RASRAS

    Tuesday, November 23, 2010 8:37 PM
  • I created a new project within the same solution where I originally got the error, yet I am still getting the error in the new project.
    testmonger
    Tuesday, May 17, 2011 8:01 PM