This documentation is archived and is not being maintained.

Code could not be found for one or more shapes in class diagram '<element>'

Visual Studio 2008

An error occurred when Class Designer attempted to display a base class, an implemented interface, or the type of a member. This class, interface, or type either cannot be resolved, or Class Designer cannot display it.

NoteNote:

This error message does not necessarily indicate that your code is in error. Although related errors may exist, this message only reports the inability of Class Designer to display what you have requested, because of the conditions described in this topic.

To correct this error

  • Ensure that the type exists. Ensure that you have not unintentionally commented out or deleted the source code.

  • Ensure that Class Designer supports the type that you entered. See "Limitations for C++ Code Elements" in Working with Visual C++ Code in Class Designer.

  • Try to resolve the type. The type might be in a project or assembly that is not referenced from the project that contains the class diagram. To correct this error, add a reference to the project or assembly that contains the type. For more information, see How to: Add or Remove References in Visual Studio (Visual Basic).

  • Ensure that the type is in the correct scope so that Class Designer can locate it. Make sure that the code is not missing a using, imports, or #include statement. Also make sure that you have not moved the type (or a related type) out of the namespace in which it was originally located. For more information, see Referencing Namespaces and Components.

Show: