本文介绍了无法将同一成员两次添加到SerializationInfo对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我单击添加并生成"按钮以在可视C#2012 Premium中生成代码时,我都遇到了编码UI测试生成器"引发的错误.

I have been running into an error thrown by the "Coded UI Test Builder" whenever I hit the "Add and Generate" button to generate the code in visual C# 2012 Premium.

编码的UI测试构建器无法准确指出错误发生的位置.

Coded UI test builder is not pointing exactly where the error is occurring.

推荐答案

您正在使用哪个版本的Visual Studio?您要测试什么类型的项目?

Which version of Visual Studio are you using? And what type of project do you test?

请创建一个新的编码UI测试,以确保所有编码UI测试是否都存在相同的问题.如果此特定测试出现问题,请检查测试中的所有代码,这些代码可能会在代码中添加两次.

Please create a new Coded UI Test to make sure whether all Coded UI Test has the same problem. If the problem occurs with this specific test, please check all the code in your test which may be add twice in your code.

如果进行所有测试,请更换另一台计算机以检查其是否与Visual Studio环境有关.如果仅在当前计算机上发生,请尝试重置所有设置并修复Visual Studio.此外,请添加最新的Visual Studio更新. 对于Visual Studio 2012,最新版本为Update5.如果其他版本的Visual Studio,请随时告诉我.
http://www.microsoft.com/zh-CN/download/details.aspx? id = 48708

If for all tests, please change another computer to check whether it is related to Visual Studio environment. If just occurs on current computer, please try reset all settings and repair your Visual Studio. Besides, please add the latest Visual Studio Update. For Visual Studio 2012, the latest version is Update 5. If other version of Visual Studio, please feel free to let me know.
http://www.microsoft.com/en-US/download/details.aspx?id=48708

如果在另一台计算机上也发生此问题,请提供示例以帮助我们在您这一边重现您的问题.因此,在重现此问题之前,请告诉我们Visual Studio版本.

If also occurs on another computer, please provide an sample to help us reproduce your problem in my side. So please tell us the Visual Studio version before we reproduce this problem.

此外,请检查您的项目,以确保您的应用和编码的UI测试项目在属性下具有相同的目标平台和.net框架版本.还要检查您的项目平台是否支持编码的UI测试.请参阅 以下链接,列出了编码UI测试支持的平台.

In addition, please check your project to make sure your app and the coded UI test project have the same target platform and .net framework version under the properties. And also check whether your project platform support Coded UI Test. Please refer to following link, which list the platform that Coded UI Test support.

https://msdn.microsoft.com/en-us/library/dd380742.aspx?f = 255& MSPPError = -2147217396


最好的问候,
威威


Best Regards,
Weiwei


这篇关于无法将同一成员两次添加到SerializationInfo对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 23:49