Compiler Warning (level 1) CS0657

'attribute modifier' is not a valid attribute location for this declaration. Valid attribute locations for this declaration are 'locations'. All attributes in this block will be ignored.

The compiler found an attribute modifier in an invalid location. See Attribute Targets for more information.

The following sample generates CS0657:

// CS0657.cs  
// compile with: /target:library  
public class TestAttribute : System.Attribute {}  
[return: Test]   // CS0657 return not valid on a class  
class Class1 {}