Property '{0}' has type '{1}' which is an invalid metadata type. Metadata can only contain values with a type that is available ...

Property '{0}' has type '{1}' which is an invalid metadata type. Metadata can only contain values with a type that is available to be embedded at compile-time into attributes. For more details of what types are valid reference section 17.1.3 in the C# specification.