| Severity | Error |
| Reported by | Metalama.Framework |
| Message | The attribute '<Attribute>' is not allowed on the compile-time declaration '<Target>', because it would not have the expected effect. |
Cause
Metalama compiles compile-time code, such as aspects, fabrics, and types marked with [CompileTime] or [RunTimeOrCompileTime], into a separate assembly that targets .NET Standard 2.0. Some attributes don't have their intended effect in this assembly.
Versions of Metalama earlier than 2026.1.28 reported LAMA0281 when the [InlineArray] attribute was applied to a compile-time type. The first placeholder of the message is the attribute, and the second is the declaration to which it's applied.
Starting with Metalama 2026.1.28, Metalama reports LAMA0294 in this situation instead, and LAMA0281 is no longer reported. For this reason, this article has no example.
Resolution
Remove the attribute from the compile-time declaration. For [InlineArray], use a regular array or another collection type in compile-time code, or move the type to run-time code if only run-time code uses it.