PostSharp Community is a free edition of PostSharp that includes both free and premium features. Free features are available in unlimited amount. However, premium features can only be applied to 1,000 lines of code.
Note that any edition of PostSharp includes the free entitlements of PostSharp Community additionally to the premium features covered by this edition.
This topic contains the following sections:
The following features of PostSharp are free and unlimited in PostSharp Community:
Method decorators and interceptors
To disable semantic advising, you have to set the SemanticallyAdvisedMethodKinds property to None in the aspect constructor.
The NotifyPropertyChangedAttribute can be used for free - but only for auto-implemented property. Instrumenting explicit properties is a premium feature.
Explicit properties are instrumented by default. To limit PostSharp to instrument only automatic properties, you can set the ExcludeExplicitProperties property to true.
All contracts can be used for free without limitation. See Contracts for details.
PostSharp Logging, Developer Mode
You can apply logging to any code size using PostSharp Community, but you need to explicitly enable the developer mode. Otherwise, production mode will be used, which is considered a premium feature.
To enable development mode, set the LoggingDeveloperMode property to true in postsharp.config. See Configuring Projects Using postsharp.config for details.
You can create your own add-ins, or use community add-ins, that use the lower layers of PostSharp SDK. Integrating with higher levels (Aspect Weaver) is a premium feature covered by PostSharp Framework or PostSharp Ultimate. This premium feature is not provided at all by PostSharp Community.
You can find more information about how we count lines of code in Number of Enhanced Lines of Code.
The limitation of 1000 enhanced lines of code per solution is implemented not by looking at the sln file, but by counting the lines of code of classes in all assemblies that are referenced by the current assembly. That is, the limit is actually 1000 lines of code of enhanced types in the whole assembly closure.
If you don't understand why PostSharp is requiring a commercial license, you can generate a licensing diagnostic log by building your project with the following command line:
msbuild /t:Rebuild /v:detailed /p:PostSharpTrace=Licensing > msbuild.log