Visual Studio Test Project的一個小問題

來源:互聯網
上載者:User

筆者的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

http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/general-discussions/test-view-return-an-exception.aspx

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

http://blogs.msdn.com/b/charles_sterling/archive/2010/04/21/test-view-issue-an-exception-was-encountered-while-constructing-the-content-of-this-frame.aspx

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.