Visual C++ Compiler Error C3270

Message Text

'field': the FieldOffset attribute can only be used in the context of StructLayout(Explicit), in which case it is required

Circumstances

This error is indeed specific to the FieldOffset attribute (or, more precisely, to the custom attribute System::Runtime::InteropServices::FieldOffsetAttribute).