Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostSharp - Apply aspect across assemblies

Tags:

postsharp

I have several projects and wish to apply aspects across multiple projects. I use the multicast attribute like so:

[assembly:MyProject.Aspects.NotifiableObject(
    AttributeTargetAssemblies = "MyProject.Entities",
    AttributeTargetTypes = "MyProject.Entities.*")]

This is placed in a AspectInfo.cs file inside my main project. This approach however does not seem to work. The entities inside MyProject.Entities do not recieve the NotifiableObject aspect. There is a similar question here, but that did not solve my problem.

like image 781
Tri Q Tran Avatar asked Jul 20 '26 21:07

Tri Q Tran


1 Answers

You cannot do this. You have to add Postsharp to each project.

like image 88
ILovePaperTowels Avatar answered Jul 24 '26 00:07

ILovePaperTowels



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!