Breaking Changes in PostSharp 5.0
PostSharp 5.0 contains the following breaking changes:
Changes causing silent changes of behavior
- The OnMethodBoundaryAspect aspect will now advise the state machine of async methods and iterators by default instead of the kick-off method. The
ApplyToStateMachineproperty is deprecated in favor of SemanticallyAdvisedMethodKinds and its default value is now
true. The behavior of existing code that ignored the
PS0215warning will silently change.
Changes causing build errors
PostSharp.Reflection.Syntaxnamespace has been renamed
PostSharp.Reflection.MethodBodyand classes inside this namespace have been renamed to reflect the fact this namespace is definitively not a syntax tree. (We were tired to apologize for this misnaming.) You must modify your code (hopefully just a few files) otherwise it will no longer build.
PostSharp.MessageLocationclass has been moved to the
PostSharp.Extensibilitynamespace. You must modify your code (hopefully just a few files) otherwise it will no longer build.
PostSharp.Patterns.Diagnosticshas been completely revamped. You must modify your code (hopefully just a few files) otherwise it will no longer build.
GenericArgsfamily of classes, a legacy from PostSharp 1.5 that no longer worked, was deleted.
It is no longer allowed to add an aspect or an advice to an anonymous method or to a method of a compiler-generated type, including the
MoveNextmethod of a state machine type. To avoid the error, implementations of IAspectProvider and pointcuts should use
method.GetSemanticInfo().IsSelectableto determine whether a method is a valid aspect or advice target.
Changes causing build warnings
PostSharp.IgnoreWarningAttributeclass has been renamed SuppressWarningAttribute and moved to the
PostSharp.Extensibilitynamespace. You will get an obsolescence warning until you modify your code.
Silverlight, Windows Phone and WinRT are no longer supported. These projects will no longer build.
Xamarin is temporarily unsupported. These projects will no longer build. Please contact our support team if you are affected by this change.
PostSharp Professional has been renamed PostSharp Framework and no longer includes PostSharp Logging. Please contact our sales team if you have a PostSharp Professional license and rely on PostSharp Logging.
PostSharp Express has been renamed PostSharp Essentials is no longer compatible with PostSharp Express 4.2 and earlier. The licensing of PostSharp Express was modified in PostSharp 4.3, but PostSharp 4.3 included a backward-compatibility licensing mode. It has now been disabled.
Use of the license server is now restricted to the new PostSharp Enterprise license. Please contact our sales team if you are affected by this change.
Please contact our sales team if you are a commercial user and are affected by the licensing changes. We will find a solution that is acceptable for both.