The test project in vs2010 encountered the same problem.
Example of error message:
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: 8080 '.
At system. componentmodel. Design. menucommandservice. addcommand (menucommand command)
At Microsoft. visualstudio. testtools. vsip. commandhelper. addcommand (imenucommandservice menuservice, eventhandler invokehandler, eventhandler statushandler, commandid)
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, Boolean nonpublic)
At Microsoft. visualstudio. Shell. Package. createmedilwindow (type toolwindowtype, int32 ID, providetool#wattribute tool)
At Microsoft. visualstudio. Shell. Package. findtoolwindow (type toolwindowtype, int32 ID, Boolean create, providetool#wattribute tool)
At Microsoft. visualstudio. Shell. Package. Microsoft. visualstudio. Shell. InterOP. ivstoolwindowfactory. createmedilwindow (guid & toolwindowtype, uint32 ID)
At Microsoft. visualstudio. Platform. windowmanagement. windowframe. constructcontent ()
Solution
================================
Restart vs2010.-_-|
Complete Solution
================================
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"
References
==================================
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