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)];
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for