博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Visual Studio Test Project的一个小问题
阅读量:6332 次
发布时间:2019-06-22

本文共 2537 字,大约阅读时间需要 8 分钟。

笔者的VS2010的Test Project遇到了一样的问题.

 

错误信息例子:

An exception was encountered while constructing the content of this frame.  This information is also logged by running the application with the /log parameter on the command line, which stores results in "C:\Users\sdavis\AppData\Roaming\Microsoft\VisualStudio\10.0\ActivityLog.xml".

Exception details:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: There is already a command handler for the menu command 'b85579aa-8be0-4c4f-a850-90902b317571 : 13074'.
   at System.ComponentModel.Design.MenuCommandService.AddCommand(MenuCommand command)
   at Microsoft.VisualStudio.TestTools.Vsip.CommandHelper.AddCommand(IMenuCommandService menuService, EventHandler invokeHandler, EventHandler statusHandler, CommandID id)
   at Microsoft.VisualStudio.TestTools.TestCaseManagement.TestViewToolWindow.Initialize()
   at Microsoft.VisualStudio.TestTools.TestCaseManagement.TestViewToolWindowHost..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at Microsoft.VisualStudio.Shell.Package.CreateToolWindow(Type toolWindowType, Int32 id, ProvideToolWindowAttribute tool)
   at Microsoft.VisualStudio.Shell.Package.FindToolWindow(Type toolWindowType, Int32 id, Boolean create, ProvideToolWindowAttribute tool)
   at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsToolWindowFactory.CreateToolWindow(Guid& toolWindowType, UInt32 id)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()

 

解决方案

====================

重启VS2010. –_-||

 

彻底解决方案

====================

1. Go to the Tools main menu -> Options… | Test Tools

2. Check the checkbox “Show all settings” to see the Test Tools settings

3. For the condition that reads “ When changes are made to the tests and background discovery of test methods is not enabled” (#9 from the top), choose “Don’t prompt”

参考资料

=====================

Test View return an exception

Test View Issue: An exception was encountered while constructing the content of this frame

转载地址:http://nlnoa.baihongyu.com/

你可能感兴趣的文章
java桥连接sql server--关于登录验证及对数据库增删改查应用
查看>>
安装软件包的三种方法
查看>>
thinkphp验证码使用
查看>>
03: 数据导入导出 、 表记录基本操作 、 查询及匹配条件 、 多表查询
查看>>
Python 高阶函数:匿名函数
查看>>
PXE 的完整版笔记,通俗易懂
查看>>
ES6视频教程
查看>>
gitlab邮箱验证 邮箱提醒设置
查看>>
为什么说数字化转型意味着领导力转型?
查看>>
CentOS7
查看>>
UITT私有化自动跟单系统
查看>>
『互联网架构』软件架构-spring源码之spring结构概述
查看>>
OSPF实训案例配置(二)
查看>>
开发者福音:「小程序测评」上线,张小龙终于更懂创业者?
查看>>
oracle INTERVAL分区表锁分区操作
查看>>
Linux服务器使用tar加密压缩文件
查看>>
《面向模式的软件体系结构4-分布式计算的模式语言》读书笔记(1)--- 从混沌到结构(1)...
查看>>
return、break、continue三者区别
查看>>
ajax提交与普通表单提交的优缺点
查看>>
avascript获取网页中指定节点的父节点、子节点的方法小结
查看>>