Cannot show interface because '<element>' cannot be found

Class Designer generates this error when the declaration of an interface is invalid or missing in the source code.

To correct this error

  • Ensure that the code element that you entered is an existing interface.

  • If the code element that you entered is defined outside your project, ensure that you have included the correct references in Solution Explorer.

  • If you modify your project structure or move source files in the project, Class Designer can lose track of the type. (This is especially true of the source type of a typedef, base classes, or association types.) If this is the case, drag the modified or relocated source code to the class diagram again to redisplay it.

See Also

Concepts

Working with Visual C++ Code in Class Designer

Other Resources

Working with Classes and Other Types

Class Designer Error Messages