Postsharp duplicate attribute?

Posted by yodaj007 on Stack Overflow See other posts from Stack Overflow or by yodaj007
Published on 2010-04-02T15:03:08Z Indexed on 2010/04/02 15:53 UTC
Read the original article Hit count: 424

Filed under:
|
|

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?

© Stack Overflow or respective owner

Related posts about postsharp

Related posts about c#