I wish to set an attribute on a public property in .NET, however I do not have access to the explicit property itself, as this has been code generated in another file.
This is a known nuisance; you simply can't add metadata to the generated members.
There are 6 options here (in order of increasing effort):
[ValidateNonEmpty("Name", "Name is required", ExecutionOrder = 1)] - then add multiple attributes to the partial class definitionTypeDescriptionProvider to provide dynamic metadata (lots and lots of work) - assuming that the consumer respects TypeDescriptor; most binding-related consumers do, but for example, Expression (used by many LINQ providers) doesn'tI usually have success with the first option, unless it is a system-defined attribute ([DisplayName], etc). If [ValidateNonEmpty] is defined by dynamic data, then you might not be able to do this.