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

Charles Sterling

In Visual Studio 2010 Under certain circumstances the you may encounter problems opening the Test View window. (see image below)


Luckily it is easy to fix.  To make it go away, you need to close/reopen Visual Studio.

If you don’t want this ever happening again, do the following:

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”

<p><img src="https://devblogs.microsoft.com/devops/wp-content/uploads/sites/6/2012/02/image_6.png" /></p>  <p>&#160;</p>  <pre>Error Text Below: </pre>
An exception was encountered while constructing the content of this frame. This information is also logged by running the application with the 7
log parameter on the command line, which stores results in “C:UsersBobAppDataRoamingMicrosoftVisualStudioUO.OActivityLog.xml’.
Exception details:
System.Reflection.TargetlnvocationException: 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(JMenuCommandService menuService, EventHandler invokeHandler,
EventHandler statusHandler, CommandiD id)
at Microsoft.VisualStudio.TestTools.TestCaseManagement.TestViewToolWindowJnitializeo
at Microsoft.VisualStudio.TestTools.TestCaseManagement.TestViewToolWindowHost..ctorO
--- End of inner exception stack trace ---


Discussion is closed.

Feedback usabilla icon