Compiler Error C3454
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C3454.
attribute] not allowed on class declaration
A class must be defined for it to be an attribute.
For more information, see attribute.
The following sample generates C3454.
// C3454.cpp
// compile with: /clr /c
using namespace System;
[attribute] // C3454
ref class Attr1;
[attribute] // OK
ref class Attr2 {};
Show: