Archive

Frequently Asked Questions

Licensing

Can I use PostSharp for free to build commercial software?

Yes. You can use PostSharp for free to build commercial software as long as your software does not require the library PostSharp.Core.dll. Most of the time, your software is only linked to PostSharp.Public.dll and PostSharp.Laos.dll.

However, if you require professional level of support, you could be interested by commercial licenses.

So when do I have to pay for PostSharp?

You have to pay for PostSharp when your software requires PostSharp.Core.dll. So if you distribute developer tools that uses PostSharp to perform analysis and transformation of assemblies of your customers (for instance an O-R framework or an application server), and do not release your product exclusively under an OSI-recognized license, you need to buy a commercial license.

My company has developed a plug-in referencing PostSharp.Core.dll. It is for internal use only. Do I need to acquire a commercial license?

No, since you don't distribute the plug-in outside your company.

I need to redistribute PostSharp.Core.dll to my customers. When do I need to acquire a commercial license?

As soon as you distribute your product outside your company (for any reason: testing, general distribution or whatever else). If your product remains inside your company, it is not 'contaminated' by GPL.

I made a plug-in for PostSharp and want to release it as open source. But I don't like GPL...

You can release your plug-in under any open-source license recognized by the Open-Source Institute. However, code linked to your plug-in will have to be released under OSS as well, because the PostSharp license is contagious even indirectly.

Policies of my company forbid the use of projects licensed under GPL or LGPL. Do you release PostSharp under a different license?

Yes. You can acquire commercial licenses today.

Support

Do you provide commercial support?

Yes. Coding Glove, the company behind PostSharp, provides two levels of technical support.

Does any other company provides commercial support?

Not that we know.

Background

How old is the project?

The project started in September 2004 as a hobby project. It took 2 years to build PostSharp Core, 1 year to build PostSharp Laos and finalize the product, and 1 year to stabilize it and market it.

So the project is not exactly young, even if it has become popular quite recently.

How do you make money out of PostSharp?

Well, we don't make a lot.

There are two sources of revenue: direct and indirect. Direct revenues come from commercial licenses, author/speaker's fees, donations and sponsorship. Indirect revenues come from consulting: PostSharp opens doors we would not even know about otherwise, and allows us to invoice more than what is the norm in the country we operate from.

Copyright, Contributions and Trademark

Who is the copyright owner of PostSharp?

Gael Fraiteur is the sole copyright owner of PostSharp.

How can I contribute to PostSharp?

You are welcome to develop plug-ins based on PostSharp. If some functionalities or extension points are missing, we will gladly add them to PostSharp.

Why don't you accept contributions into PostSharp itself?

Because we don't want to loose code ownership because of small contributions. Holding the whole copyright, we are able to sell commercial licenses. We don't want to loose this ability because of a few percents of contributed code.

Contributors are welcome to write plug-ins that can eventually be packaged together with PostSharp. However, we want to keep a clean separation between code owned by different contributors.

Note that most successful open-source projects rely on private ownership of source code. Collective ownership is rare, even if there are some famous exceptions.

I read PostSharp is a trademark. Can I use the word 'PostSharp' in my plug-in?

Yes, but you have to make it clear that your plug-in is not a part of PostSharp itself, and is not endorsed by the trademark holders. So don't name your product "PostSharp Logging Framework" but "Logging Framework for PostSharp". The same with the namespace: you cannot start of your product with "PostSharp", because it would be misleading.

 

Documentation

Documentation

PostSharp comes with a great user documentation and class reference, not counting scientific articles and community-contributed tutorials. Check the resources below:

Getting Started

Reference Documentation

  • Online documentation: a complete conceptual and reference documentation. This documentation is also installed on your computer and integrated with Visual Studio when you install PostSharp.
  • Scientific publication (PDF): a formal description of PostSharp presented at the scientific conference AOSD 2008 and published in the proceedings of the industry tracks.

Aspects in General

Contributed Tutorials

Other Resources

Architecture

Architecture

PostSharp is designed as an extensible platform for post-processing of .NET assemblies. All analysis and transformations are encapsulated into tasks, which are packaged into plug-ins and loaded in the platform. This platform is named PostSharp Core, while we group under the term PostSharp all the members of this product family.

Most of people use existing plug-ins, like PostSharp Laos. They do not need any extensive knowledge of PostSharp Core and MSIL. If you have more specific requirements, or if you are an Independent Software Vendor producing development tools, you may want to develop your own plug-ins, or even to integrate the platform into your existing tools.

PostSharp Architecture

PostSharp Core

PostSharp Core is the naked platform, coming with no high-level functionality for the end-user. However, it offers a comprehensive and reliable infrastructure on which any assembly post-processing application can rely.

PostSharp Core is made of the following components:

  • The Code Object Model represents with high precision and fidelity any assembly of .NET 2.0, 3.0 or 3.5. It offers high usability and performance. Among useful features of this component: cross-module binding, System.Reflection binding, complex indexing, custom tagging. The Code Object Model is the most fundamental component of PostSharp Core.
  • The Module Reader and Module Writer are responsible for parsing binary assemblies into the Code Object Model and writing them back to binary form.
  • The Low-Level Code Weaver allows injection of MSIL instructions into existing methods. It performs the demanding task of detecting join points and restructuring existing instructions. It serves as a base for weavers of higher level like Laos, while allowing many high-level weavers to coexist peacefully when applied on the same assembly.
  • The Platform Infrastructure manages the whole post-compilation process. It resolves tasks dependencies, load plug-ins on demand, and execute tasks in the proper order. Tasks can be included explicitly in projects by users, or they can be automatically detected during the post-compilation process.

Extension Points

There are typically three ways to develop for PostSharp: writing plug-ins, using PostSharp as a class library, or bootstrapping the platform infrastructure.

Writing Plug-Ins

This is what you will probably do if you need to offer a functionality that cannot be implemented with full satisfaction by other plug-ins.

Plug-ins can use all functionalities of PostSharp Core and of any other plug-in; therefore, you can focus on the real added value of your component, and let infrastructure concerns up to PostSharp.

Plug-ins are sets of tasks, whose dependencies are described in the plug-in manifest.

PostSharp Laos is a good example of plug-in offering added-value features over PostSharp Core.

Using PostSharp As a Class Library

If you don't need the burden of the Platform Infrastructure, but still want to use PostSharp Core, you can use it as a class library. Most functionalities are available even without the Platform Infrastructure.

For instance, you can develop a Reflector-like decompiler based on PostSharp Core.

Bootstrapping the Platform Infrastructure

PostSharp comes with three bootstrappers (or hosts): the MSBuild task, the nant task, and the command-line utility.

If you need to embed assembly-transformation capability in your application, you should consider to host the PostSharp Platform Infrastructure. This is the case, for instance, if you develop an application server.