SharpCrafters Forum – using postsharp on compiled assemblies

SharpCrafters Support Forum

        


using postsharp on compiled assemblies Expand / Collapse
Author
Message
Posted 1/15/2010 7:50:45 AM


Community Member
Hi,
is it possible to integrate postsharp globally at the Framework level, so that it will influence all .NET assemblies without the need to build them with PostSharp in the first place? for instance, take an exe that was not built with PostSharp and inject code into it.

Thanks
Post #3239
Posted 1/15/2010 7:55:12 AM


Gael Fraiteur

SharpCrafters
Yes, this is possible, but currently there is no way to provide aspects to PostSharp. So you should develop your own aspect provider (IAspectProvider) or custom attribute provider (IAnnotationProvider) using an add-in. You should also write a PostSharp project (*.psproj), then use the command-line utility.

I guess you can get it working in a couple of days, so consider how it's important to you.

The short answer is: it is possible, but not off-the-shelf.

-gael
Post #3240
Posted 1/15/2010 8:25:08 AM


Community Member
Thanks.
Let's say i want to hook on a specific method from the Framework BCL, so that every time it is called i'll have the chance to do something.
How can i do that? What configuration changes does it require at the .NET Framework?
Post #3241
« Prev Topic | Next Topic »


All times are GMT +1:00, Time now is 11:33am

Powered By InstantForum.NET v4.1.4 © 2010
Execution: 0.082. 7 queries. Compression Disabled.