Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Free analogue of the PostSharp required [closed]

I have heard of PostSharp, but I am wondering if there are any other similar tools - anything analogous to PostSharp?

Are there any libraries that could be used as an alternative to PostSharp? Any other tools that can post-process an assembly and inject code based on attributes?

Any free and/or open source alternatives to PostSharp would be especially interesting.

Thank you.

like image 547
Igor Soloydenko Avatar asked Dec 29 '22 01:12

Igor Soloydenko


1 Answers

We also had a need for a free alternative to PostSharp for some open source libraries we are developing that required composition and other "professional" features of PostSharp requiring license fees. Since we did not want to create open source software that was not actually free, I started working with the Microsoft.Cci libraries on CodePlex . These libraries support absolutely everything that PostSharp does and then some (you could create an entire assembly from scratch if you wanted). In fact, the PostSharp website lists this as an alternative.

I am not sure the status of the CciSharp project mentioned above, but it is based on these libraries.

The downside of using Microsoft.Cci for the casual developer is these libraries are so powerful that they end up being extremely difficult to use. For this reason, I started an open source project called Afterthought that leverages Microsoft.Cci, but provides a simple API footprint and requires no knowledge of Cci or dependencies on it to work.

My recommendation would be to use the PostSharp community edition if the feature set matches your needs, as this is a mature solution with decent performance. If you are brave and need to perform some complex mods, use the Microsoft.Cci libraries. If you are somewhere in between and are willing to help provide feedback on feature sets, give Afterthought a try.

like image 130
Jamie Thomas Avatar answered Jan 07 '23 10:01

Jamie Thomas