You can use PostSharp to build applications for a wide range of devices. This article lists the requirements for development, build and end-user devices.
Important
Read our Supported Platforms Policies on our website, which contains important explanations, restrictions, and disclaimers regarding this article.
Supported programming languages
This version of PostSharp supports the following languages:
C# 14.0 or earlier
VB 17.13 or earlier
PostSharp only supports the compilers that ship with the supported versions of Visual Studio, .NET Core SDK, or .NET SDK. Other compiler versions, especially pre-Roslyn ones, are no longer supported.
You may use PostSharp with an unsupported language version at your own risk by setting the PostSharpSkipLanguageVersionValidation MSBuild property to True. There are two risks in doing that: inconsistent or erroneous behavior of the current version of PostSharp, and breaking changes in a future version of PostSharp that will support this language version.
Requirements on development workstations
This section lists the supported platforms, and most importantly platform versions, on which PostSharp is intended to be used while developing software.
The following software components need to be installed before PostSharp can be used:
Any of the following versions of Microsoft Visual Studio:
- Visual Studio 2022 (17.12 and later).
- Visual Studio 2026 (18.0 and later).
The debugging experience may be inconsistent with IDEs other than Visual Studio or when PostSharp Tools for Visual Studio are not installed.
.NET Framework 4.7.2 or later.
Any of the following operating systems:
- Windows 10 and Windows 11 x64: any version in mainstream Microsoft support, except LTSB and S editions.
- Windows 11 ARM64: any version in mainstream Microsoft support, except LTSB and S editions.
Optionally, one of the following versions of .NET SDK:
- .NET SDK 8.0 (build 8.0.100 or later).
- .NET SDK 9.0 (build 9.0.100 or later).
- .NET SDK 10.0 (build 10.0.100 or later).
Requirements on build servers
- Any of the following operating systems currently in mainstream support by their respective vendors:
- Windows Server 2022
- Windows Server 2025 x64 or ARM64
- Windows 10 x64
- Windows 11 x64 or ARM64
- Ubuntu 20.04 LTS x64
- Ubuntu 22.04 LTS x64 or ARM64
- Ubuntu 24.04 LTS x64 or ARM64
- macOS 13+ ARM64
- Alpine Linux 3.18+ x64
- Alpine Linux 3.18+ ARM64
At least one of the following:
- .NET Framework 4.7.2 and later + Build Tools for Visual Studio or Visual Studio, version 2022 (17.12 and later) or 2026 (18.0 and later).
- .NET SDK 8.0 (build 8.0.100 or later).
- .NET SDK 9.0 (build 9.0.100 or later).
- .NET SDK 10.0 (build 10.0.100 or later).
Requirements on end-user devices
The following table displays the versions of the target frameworks that are supported by the current release of PostSharp and its components.
| Package | .NET Framework | .NET Core & .NET | .NET Standard*** | Blazor*** |
|---|---|---|---|---|
| PostSharp | 4.5.2 *, 4.6.x *, 4.7.x, 4.8.x | 6.0 #, 8.0, 9.0, 10.0 | 2.0, 2.1 | Supported |
| PostSharp.Patterns.Common PostSharp.Patterns.Aggregation PostSharp.Patterns.Model |
4.7.1, 4.7.2, 4.8.x** | 6.0 #, 8.0, 9.0, 10.0 | 2.0, 2.1 | Supported |
| PostSharp.Patterns.Diagnostics % | 4.7.1, 4.7.2, 4.8.x** | 6.0 #, 8.0, 9.0, 10.0 | 2.0, 2.1 | Supported |
| PostSharp.Patterns.Threading | 4.7.1, 4.7.2, 4.8.x** | 6.0 #, 8.0, 9.0, 10.0 | 2.0, 2.1 | - |
| PostSharp.Patterns.Xaml | 4.7.1, 4.7.2, 4.8.x** | 6.0‑windows #, 8.0‑windows, 9.0‑windows, 10.0‑windows | - | - |
| PostSharp.Patterns.Caching %% | 4.7.1, 4.7.2, 4.8.x** | 6.0 #, 8.0, 9.0, 10.0 | 2.0, 2.1 | Supported |
Note
* .NET Framework 4.5.2, 4.6 and 4.6.1 are no longer supported by Microsoft. Although we still provide libraries targeting .NET Framework 4.5.2 and 4.6.x, we no longer run our tests on these versions.
Note
** .NET Framework ARM64 is experimentally supported for PostSharp Pattern Libraries. We recommend using PostSharp Pattern Libraries on ARM64 Windows with emulated .NET Framework x64.
Note
*** PostSharp does not implicitly support all platforms that support .NET Standard. Only platforms mentioned in this table are supported.
Note
% Each PostSharp.Patterns.Diagnostics logging backend has a different set of supported target frameworks. Refer to the individual packages on nuget.org.
Note
%% Each PostSharp.Patterns.Caching caching backend has a different set of supported target frameworks. Refer to the individual packages on nuget.org.
Note
# .NET 6.0 is no longer supported by Microsoft. Although we still provide libraries targeting it, we no longer run our tests on this specific version of .NET. We recommend using a supported version of .NET runtime in your final application.
Compatibility with deprecated versions of .NET Core and .NET
When targeting .NET Core 2.x, .NET Core 3.x, .NET 5.0, or .NET 7.0, your project will consume PostSharp assemblies for an older target framework, such as .NET Standard 2.0 or .NET 6.0.
As these platforms are unsupported, we do not test our libraries against them. We recommend using a supported runtime target framework in your final application.
Compatibility with Xamarin
Xamarin support by Microsoft ended on May 1, 2024 and is therefore unsupported by PostSharp.
Xamarin was supported as a run-time platform only via .NET Standard. PostSharp still contains mechanisms that allow for use with Xamarin, but these will not be maintained further.
It is possible to include PostSharp packages in your .NET Standard libraries and then reference these libraries in your Xamarin application project. Adding PostSharp directly to a Xamarin application project is not possible.
Xamarin applications use a linker that is executed at build time to discard the unused code and reduce the size of the application. To prevent the linker from removing the code required by PostSharp, you need to add a custom linker configuration to your project. See Compatibility with Xamarin for more details.
Compatibility with Blazor
Blazor is supported as a run-time platform only via .NET Standard. You can add supported PostSharp packages to your .NET Standard libraries and then reference these libraries in your Blazor application project. Adding PostSharp directly to a Blazor application project is not supported.
Blazor applications use a linker that is executed at build time to discard the unused code and reduce the size of the application. To prevent the linker from removing the code required by PostSharp, you need to add a custom linker configuration to your project. See Compatibility with Blazor for more details.
To debug Blazor applications, the PostSharpDebuggerExtensionsMode MSBuild property should be set to Disabled for all referenced projects using PostSharp, otherwise the debugger may fail to load debugging symbols properly. See Compatibility with Blazor for more details.
Compatibility with ASP.NET 1.0 - 4.8
There are two ways to develop web applications using Microsoft .NET:
ASP.NET Application projects are very similar to other projects; they need to be built before they can be executed. Since they are built using MSBuild, you can use PostSharp as with any other kind of project.
ASP.NET Site projects are very specific: there is no MSBuild project file (a site is actually a directory), and these projects must not be built. ASP.NET Site projects are not supported.
ASP.NET Core is supported when used with a supported .NET SDK.
Compatibility with Microsoft Code Analysis
By default, PostSharp reconfigures the build process so that Code Analysis is executed on the assemblies as they were before being enhanced by PostSharp. If you are using Code Analysis as an integrated part of Visual Studio, no change of configuration is required.
You can request that Code Analysis run on the output of PostSharp by setting the ExecuteCodeAnalysisOnPostSharpOutput MSBuild property to True. For more information, see Configuring Projects Using MSBuild.
Compatibility with Microsoft Code Contracts
PostSharp configures the build process so that Microsoft Code Contracts is executed before PostSharp. Additionally, Microsoft Code Contracts' static analyzer will be executed synchronously (instead of asynchronously without PostSharp), which will significantly impact the build performance.
Compatibility with Obfuscators
PostSharp generates assemblies that are theoretically compatible with all obfuscators.
Note
PostSharp Logging is not designed to work with obfuscated assemblies.
Caution
PostSharp emits constructs that are not emitted by Microsoft compilers (for example methodof). These unusual constructs may reveal bugs in third-party tools, because they are generally tested against the output of Microsoft compilers.
Compatibility with ARM platforms
Developing on Windows 11 ARM64 and building on the ARM64 operating systems listed above are supported. Developing on other ARM platforms (for example macOS or Raspberry Pi) is not supported.
Targeting ARM64 is supported: you can build a project with the arm64 platform target on an ARM64 machine. Targeting 32-bit ARM (the arm platform target) is not supported. Prefer Any-CPU.
Known Incompatibilities
PostSharp is not compatible with the following products or features:
| Product or Feature | Reason | Workaround |
|---|---|---|
| Visual Studio 2019 | No longer under Microsoft mainstream support | Use PostSharp 2024.0. |
| Visual Studio 2017 | No longer under Microsoft mainstream support | Use PostSharp 6.10. |
| Visual Studio 2015 | No longer under Microsoft mainstream support | Use PostSharp 6.5. |
| Visual Studio 2013 | No longer under Microsoft mainstream support | Use PostSharp 6.0. |
| Visual Studio 2012 | No longer under Microsoft mainstream support | Use PostSharp 5.0. |
| Visual Studio 2010 | No longer under Microsoft mainstream support | Use PostSharp 3.1. |
| ILMerge | Bug in ILMerge | Use another merging product (such as ILPack, SmartAssembly). |
| Edit-and-Continue | Not Supported | Rebuild the project after edits |
| Silverlight 3 or earlier | No longer under Microsoft mainstream support | Use PostSharp 2.1. |
| Silverlight 4 | No longer under Microsoft mainstream support | Use PostSharp 3.1. |
| Silverlight 5 | Low customer demand. | Use PostSharp 4.3. |
| .NET Compact Framework | No support for PCL | Use PostSharp 2.1. |
| .NET Framework 4.0 | No longer under Microsoft mainstream support | Target .NET Framework 4.5 or use PostSharp 6.5. |
| .NET Framework 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1 | No longer under Microsoft mainstream support | Target .NET Framework 4.6.2 or use PostSharp 6.10. |
| .NET Framework 2.0 | No longer under Microsoft mainstream support | Target .NET Framework 3.5 or use PostSharp 3.1. |
| .NET Core SDK 1.0, 1.1, 2.2, 3.0, 3.1 | No longer supported by Microsoft (end of life) | Use .NET 8.0 SDK (LTS). |
| .NET SDK 5.0 (any version) | No longer supported by Microsoft (end of life) | Use .NET 8.0 SDK (LTS). |
| Windows Phone 7 | No longer under Microsoft mainstream support | Use PostSharp 3.1 |
| Windows Phone 8, WinRT | Low customer demand. | Use PostSharp 4.3 |
| Visual Studio Express | Microsoft's licensing policy | Use Visual Studio Community Edition |
| ASP.NET Web Sites | Not built using MSBuild | Convert the ASP.NET Web Site to an ASP.NET Web Application. |
| Universal Windows Platform (UWP) | Not supported (low customer demand) | Contact PostSharp support team. |
| Mono, Unity3D | Unsupported | None. |
| Xamarin | Unsupported | Use Microsoft MAUI. |