Reputation:
I am considering PostSharp (www.postsharp.org) at this time to write my own custom logging system (sitting on top of log4net) as part of my application. Do you think PostSharp qualifies in all these requirements?
This are my requirements:
I want to be able to write custom "Aspects" that work on methods, properties, fields, class and at assembly levels.
I want to be able to use the tool for .NET 2.0 projects as well as 3.5, specifically in WinForms and ASP.NET (MVC included) and WCF projects
I don't want to be running a separate tool (exe) apart from my own software at client machines / deployment points.
Preferable: It is preferable that i would want to avoid even having to redistribute any of the tool's dlls. But the requirement to not re-distribute run-time dlls with apps may be a pushing requirements - so skip it.
I want to extend this to mainly write my custom logging aspects for my applications.
I will be redistributing my web applications and the windows forms apps. So i want to ensure the tool i am going to use is free of any kind of royalty payments or license fees, and also that it does not restrict me into one particular type of license. I am selling commercial licenses of my applications.
Upvotes: 2
Views: 1200
Reputation: 6857
Have a look at Log4PostSharp before you start coding a custom aspect yourself using PostSharp.Core.
Upvotes: 2
Reputation: 6857
Yes.
Yes. If you want to compile aspected code from ASP.NET, you will need to deploy PostSharp build-time components on the ASP.NET server. Not sure it's what you want given (3).
If you develop your own custom aspect using PostSharp.Core, you do not need any dependency. If you use PostSharp Laos, you will need to redistribute PostSharp.Public.dll and PostSharp.Laod.dll.
No problem.
If you distribute compiled webs, there is no problem. If you distribute source code that needs to be enhanced by the weaver, you need to redistribute the whole PostSharp stuff. Possible, but not very sexy.
Upvotes: 0