PostSharp 2027.0.1-preview
Pre-releasePostSharp 2027.0.1-preview is the first preview of PostSharp 2027.0. It is based on v2026.0.18, plus the following changes.
PostSharp 2027.0 moves the supported platforms to .NET 10 and .NET 11, and replaces the licensing, configuration, telemetry and user interface services of the compiler with the infrastructure stack that Metalama also uses. The PostSharp Options application is replaced by a web-based user interface and by the new postsharp command line tool. Several of these changes are breaking: read the section below before upgrading.
Warning
The PostSharp.Tool package, which provides the postsharp command line tool, was not uploaded to nuget.org with this release by mistake, so dotnet tool install -g PostSharp.Tool fails for now. It will be published with the next release (#171). Until then, supply a licence key through the PostSharpLicense MSBuild property or postsharp.config.
Breaking Changes
- #87
net6.0,net8.0andnet9.0are no longer supported target frameworks, and the packages no longer ship assets for them.net10.0andnet11.0are supported, and the minimum SDK at build time is the .NET 10 SDK. - #114 Removed the PostSharp Options application (
PostSharp.Settings.UI.exeandPostSharp.Settings.exe). It is replaced by a web-based user interface, which is shared with Metalama: the build shows toast notifications, and they open pages served locally in the browser, for example to register a licence key. SetPostSharpDisableUserInterfacetoTrueto silence them. - #117 Interactive builds on Linux and macOS now require a licence, as they always have on Windows. Builds under a CI agent, a service or a container remain unattended.
- #118 Usage telemetry is switched on at the first build unless the user opts out, with a notification that says how to turn it off. Crash reporting is unchanged and is never sent without consent.
- #142 Add-ins compile against the reference assemblies of the new
PostSharp.Sdkpackage.PostSharp.Compiler.CommonandPostSharp.Compiler.Enginenow only depend on it. - #145 Builds on Windows build agents now use the pipe server, which keeps running after the build. Set
PostSharpUsePipeServer=Falseto restore the former behaviour.PostSharpAllowPipeServerWhenUnattendedis obsolete.
New
- #119 Added the
postsharpcommand line tool (dotnet tool install -g PostSharp.Tool), which registers licence keys, edits settings and reports the telemetry state, on Windows, Linux and macOS. - #124 Added
postsharp shutdown, which stops the PostSharp processes that keep running after a build, such as the pipe server. - SharpCrafters.Backstage#15
postsharp shutdownalso stops the .NET build servers (dotnet build-server shutdown, theVBCSCompilerserver and the MSBuild nodes) and the background worker and notifier. Without--force, a process that does not exit is reported as still running.postsharp killis another name of the same command. - #170 Added support for licence keys signed with Elliptic Curve DSA (P-256 and SHA-256). Keys signed with DSA, which include every key issued so far, remain valid. Finite field DSA is not available on macOS in .NET 11, so a signed licence key can now be verified on every supported platform.
Fixes
- #115 Fixed an intermittent build failure with
ObjectDisposedException: Safe handle has been closedwhile assembly identities are read concurrently, for example in a solution build through the pipe server. - #116 Fixed a build failure with PS0242 in a linked git worktree when the licence key is limited to a namespace.
- #154 Fixed, on Linux and macOS, a package whose version contains an upper-case letter (for example
1.0.0-RC1) being left out of the dependencies of the compiler, with a "Couldn't locate restored package" warning. - #159 Fixed a hang of the Redis caching backend in
Clear,InvalidateDependencyorCleanUpAsync, which kept a CPU core busy and ignored the cancellation token. - #160 Fixed a
NullReferenceExceptioninMultiplexerBackendwhen a child logging backend creates no transaction.