Built-in AOP in C# - is it on the way?

Sam Saffron picture Sam Saffron · May 7, 2009 · Viewed 14k times · Source

In large apps I find myself really wishing I had built-in AOP facilities. As it stands in C# the best you can do is factories and RealProxys, PostSharp, ICorDebug, ICorProfiler or injection frameworks. There is no clean built-in way of doing AOP.

Is there any indication anywhere (blog post / internal discussion) that indicates that AOP is on the way?

Answer

Jb Evain picture Jb Evain · May 7, 2009

Romain's answer covers (almost :) perfectly the current solutions. As for the future support, Anders Hejlsberg has previously stated that they'were in wait & see mode about AOP.

We can only hope that with the managed rewrite of csc, and a «Compiler as a Service», one could plug into the compiler, and inject aspects there.