Postsharp duplicate attribute?
- by yodaj007
Can anyone explain why I'm getting this compile error?
Duplicate 'Rad.Core.Aop.MethodArgumentValidation' attribute E:\Scripting\Rad.Core\Properties\AssemblyInfo.cs
This is the code:
[assembly: Rad.Core.Aop.MethodArgumentValidation(AttributeTargetTypes="Rad.*", AttributePriority=1)]
[assembly: Rad.Core.Aop.MethodArgumentValidation(AttributeTargetTypes = "Rad.Core.Aop.*", AttributePriority = 2, AttributeExclude=true)]
Here is the declaration of the aspect:
[Serializable]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property)]
[MulticastAttributeUsage(MulticastTargets.Method, AllowMultiple=true)]
public class MethodArgumentValidationAttribute : OnMethodInvocationAspect
{ ... }
It looks like I'm following this example: http://www.sharpcrafters.com/blog/post/multicasting-of-custom-attributes.aspx
Can anyone help?