locked
Cannot add the same member twice to a SerializationInfo object. RRS feed

  • Question

  • System.Runtime.Serialization.SerializationException occurred

      HResult=-2146233076

      Message=Cannot add the same member twice to a SerializationInfo object.

      Source=mscorlib

      StackTrace:

        Server stack trace:

           at System.Runtime.Serialization.SerializationInfo.AddValue(String name, Object value, Type type)

           at System.Exception.GetObjectData(SerializationInfo info, StreamingContext context)

           at Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException.GetObjectData(SerializationInfo info, StreamingContext context)

           at Microsoft.VisualStudio.TestTools.UITest.Extension.UITestControlNotFoundException.GetObjectData(SerializationInfo info, StreamingContext context)

           at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)

           at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)

           at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)

           at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)

           at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.SerializeResponse(IServerResponseChannelSinkStack sinkStack, IMessage msg, ITransportHeaders& headers, Stream& stream)

           at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)

        Exception rethrown at [0]:

           at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)


    • Edited by tsingh2 Tuesday, November 26, 2013 4:19 PM
    Monday, November 25, 2013 8:50 PM

Answers

  • Hi tsingh2,

    Thanks for your response.

    You mean that the Coded UI test supports this control, am I right? Since we don’t have the app UI, sorry for that I couldn't repro it in my side.

    If you repro it in other machines, whether it has the same issue? Please install the VS2012 update 4. You could download it here:

    http://www.microsoft.com/en-us/download/details.aspx?id=39305

    If all machines have the same issue, I suggest you submit a connect report here: http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx, and you will get email notification for update.

    Of course, if possible, you could share me a simple app, I will debug it in my side, if I get the same issue as yours, I will help you vote the connect report if you submit it.

    Please attach your Visual Studio project, you can upload it to the sky drive, and then share the download link in your post.

    If there's any concern, please feel free to let me know.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 4, 2013 7:37 AM

All replies

  • Hi tsingh2,

    Thank you for posting in the MSDN forum.

    Which kind of app are you testing? Which VS version are you using? Whether all apps have the same issue or just the specific app has this issue?

    Cannot add the same member twice to a SerializationInfo object

    I have met this issue before:

    http://social.msdn.microsoft.com/Forums/en-US/fa5bfb1b-bf3c-4309-ba27-52064bf465a4/cannot-add-the-same-member-twice-to-a-serializationinfo-object-in-coded-ui-test-builder?forum=vstest

    So we could make sure that whether the specific app supports the coded UI test before you record a test for it.

    http://msdn.microsoft.com/en-us/library/dd380742(v=vs.110).aspx

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, November 27, 2013 8:56 AM
  • Hi Jack,

    I am testing our in house UI tool.

    VS version is 12. IE is 10 . We are running all the apps and VS on windows 7

    There is specific app which has issue as shown in picture attached with original comment.

    The "Usinput" itemlist shown in the picture is the ListItem icon.

    It error happens when you take the crossbar assertion on that icon. That exact error message pops up. Not sure the reason. Maybe its a bug in the CodedUI TestBuilder tool.

    Please let me know if you have any recommendation to resolve this issue.

    Thanks again


    • Edited by tsingh2 Tuesday, December 3, 2013 12:26 PM
    Tuesday, December 3, 2013 12:25 PM
  • Hi tsingh2,

    Thanks for your response.

    You mean that the Coded UI test supports this control, am I right? Since we don’t have the app UI, sorry for that I couldn't repro it in my side.

    If you repro it in other machines, whether it has the same issue? Please install the VS2012 update 4. You could download it here:

    http://www.microsoft.com/en-us/download/details.aspx?id=39305

    If all machines have the same issue, I suggest you submit a connect report here: http://connect.microsoft.com/VisualStudio/feedback/CreateFeedback.aspx, and you will get email notification for update.

    Of course, if possible, you could share me a simple app, I will debug it in my side, if I get the same issue as yours, I will help you vote the connect report if you submit it.

    Please attach your Visual Studio project, you can upload it to the sky drive, and then share the download link in your post.

    If there's any concern, please feel free to let me know.

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, December 4, 2013 7:37 AM