컴파일러 오류 C3451
'attribute': 'type'에 관리되지 않는 특성을 적용할 수 없습니다.
C++ 특성은 CLR 형식에 적용할 수 없습니다. 자세한 내용은 C++ 특성 참조를 참조하세요.
자세한 내용은 User-Defined Attributes을 참조하세요.
이 오류는 Visual Studio 2005에 대해 수행된 컴파일러 규칙 작업의 결과로 생성될 수 있습니다. CLR 프로그래밍을 사용하여 사용자 정의 특성에서 uuid 특성이 더 이상 허용되지 않습니다. 대신 GuidAttribute을 사용합니다.
예시
다음 샘플에서는 C3451을 생성합니다.
// C3451.cpp
// compile with: /clr /c
using namespace System;
[ attribute(AttributeTargets::All) ]
public ref struct MyAttr {};
[ MyAttr, helpstring("test") ] // C3451
// try the following line instead
// [ MyAttr ]
public ref struct ABC {};