Share via


컴파일러 오류 C3451

업데이트: 2007년 11월

오류 메시지

'attribute': 'type'에 관리되지 않는 특성을 적용할 수 없습니다.
'attribute': cannot apply unmanaged attribute to 'type'

CLR 형식에 C++ 특성을 적용할 수 없습니다. 자세한 내용은 C++ Attributes Reference를 참조하십시오.

자세한 내용은 User-Defined Attributes을 참조하십시오.

이 오류는 Visual C++ 2005에 대해 수행된 즉, CLR 프로그래밍을 사용하는 사용자 정의 특성에 uuid (C++ Attributes) 특성이 더 이상 허용되지 않는다는 컴파일러 규칙의 결과에 따라 발생할 수 있습니다. GuidAttribute를 대신 사용해야 합니다.

자세한 내용은 Visual C++ 2005 컴파일러의 주요 변경 사항을 참조하십시오.

예제

다음 샘플에서는 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 {};