Error message when you use a visualizer or a type proxy when you debug in Visual Studio 2005: "Cannot create an instance of <visualizer type name>" (913453)



The information in this article applies to:

  • Microsoft Visual Studio 2005 Team System Architect Edition
  • Microsoft Visual Studio 2005 Team System Developer Edition
  • Microsoft Visual Studio 2005 Team System Test Edition
  • Microsoft Visual Studio 2005 Tools for the Microsoft Office System
  • Microsoft Visual Studio 2005 Standard Edition
  • Microsoft Visual Studio 2005 Professional Edition

SYMPTOMS

Consider the following scenario. You use a visualizer or a type proxy when you debug in Microsoft Visual Studio 2005. The visualizer or the type proxy is a generic type. In this scenario, you may receive an error message that resembles the following:
System.ArgumentException: Cannot create an instance of visualizer type name because Type.ContainsGenericParameters is true.

CAUSE

This behavior occurs because Visual Studio 2005 does not support the generic type for a visualizer or for a type proxy.

When you debug in Visual Studio 2005, the debuggee side sends the data object to the visualizer in the debugger side. To correctly display the data object in the visualizer, Visual Studio 2005 requires that the visualizer or the type proxy be fully instantiated before the debugger receives the data object from the target type. If the visualizer or the type proxy is a generic type, the visualizer or the type proxy cannot be fully instantiated before the debugger receives the data object.

Note You can write a visualizer for a target that is a generic type only if the generic type is an open type.

STATUS

This behavior is by design.

MORE INFORMATION

For more information about how to write a visualizer, visit the following Microsoft Developer Network (MSDN) Web site:

Modification Type:MajorLast Reviewed:5/18/2006
Keywords:kberrmsg kbtshoot kbprb KB913453 kbAudDeveloper