Compiler Error C3462

'type': only an imported type can be forwarded

The TypeForwardedTo attribute must be applied to a type in referenced metadata.

For more information, see Type Forwarding (C++/CLI).

Examples

The following sample creates a component.

// C3462.cpp
// compile with: /clr /LD
public ref class R {};

The following sample generates C3462.

// C3462b.cpp
// compile with: /clr /c
#using "C3462.dll"
ref class N {};
[assembly:TypeForwardedTo(N::typeid)];   // C3462
[assembly:TypeForwardedTo(R::typeid)];