Microsoft.Windows.Compatibility
10.0.0-preview.7.25380.108
Prefix Reserved
dotnet add package Microsoft.Windows.Compatibility --version 10.0.0-preview.7.25380.108
NuGet\Install-Package Microsoft.Windows.Compatibility -Version 10.0.0-preview.7.25380.108
<PackageReference Include="Microsoft.Windows.Compatibility" Version="10.0.0-preview.7.25380.108" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="10.0.0-preview.7.25380.108" />
<PackageReference Include="Microsoft.Windows.Compatibility" />
paket add Microsoft.Windows.Compatibility --version 10.0.0-preview.7.25380.108
#r "nuget: Microsoft.Windows.Compatibility, 10.0.0-preview.7.25380.108"
#:package Microsoft.Windows.Compatibility@10.0.0-preview.7.25380.108
#addin nuget:?package=Microsoft.Windows.Compatibility&version=10.0.0-preview.7.25380.108&prerelease
#tool nuget:?package=Microsoft.Windows.Compatibility&version=10.0.0-preview.7.25380.108&prerelease
Microsoft.Windows.Compatibility
The Microsoft.Windows.Compatibility
package provides Windows-specific APIs to help you port your .NET Framework applications to .NET Core 2.0+, .NET 5+ or .NET Standard. This package offers a smoother transition for those looking to modernize their applications without losing access to familiar Windows functionalities.
Getting Started
To start using the Microsoft.Windows.Compatibility
package, you'll first need to install it via NuGet Package Manager, Package Manager Console, or by editing your project file.
Usage
After installing the package, you can access Windows-specific APIs just like you would in a .NET Framework application. Below are some examples in both C# and VB:
Writing to the Windows Registry
C#
using Microsoft.Win32;
class Program
{
static void Main()
{
using (RegistryKey key = Registry.CurrentUser.CreateSubKey("Software\\MyApp"))
{
key.SetValue("MySetting", "MyValue");
}
}
}
VB
Imports Microsoft.Win32
Module Program
Sub Main()
Using key As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\MyApp")
key.SetValue("MySetting", "MyValue")
End Using
End Sub
End Module
Using the Serial Port
C#
using System.IO.Ports;
class Program
{
static void Main()
{
using (SerialPort port = new SerialPort("COM1", 9600))
{
port.Open();
port.WriteLine("Hello, world!");
}
}
}
VB
Imports System.IO.Ports
Module Program
Sub Main()
Using port As New SerialPort("COM1", 9600)
port.Open()
port.WriteLine("Hello, world!")
End Using
End Sub
End Module
Additional Documentation
For more in-depth tutorials and API references, you can check the following resources:
- Use the Windows Compatibility Pack to port code - .NET
- Announcing the Windows Compatibility Pack for .NET Core
- Installing NuGet client tools | Microsoft Learn
Feedback
We value your feedback! Here are ways to get in touch with us:
- Open an issue on our GitHub repository
- Reach out on Twitter with the hashtag #dotnet
- Join our Discord channel: dotnet/Discord
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.0
- Microsoft.Win32.Registry (>= 5.0.0)
- Microsoft.Win32.Registry.AccessControl (>= 10.0.0-preview.7.25380.108)
- Microsoft.Win32.SystemEvents (>= 10.0.0-preview.7.25380.108)
- System.CodeDom (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition (>= 10.0.0-preview.7.25380.108)
- System.Configuration.ConfigurationManager (>= 10.0.0-preview.7.25380.108)
- System.Data.DataSetExtensions (>= 4.5.0)
- System.Data.Odbc (>= 10.0.0-preview.7.25380.108)
- System.Data.OleDb (>= 10.0.0-preview.7.25380.108)
- System.Data.SqlClient (>= 4.9.0)
- System.Diagnostics.EventLog (>= 10.0.0-preview.7.25380.108)
- System.Diagnostics.PerformanceCounter (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.AccountManagement (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.Protocols (>= 10.0.0-preview.7.25380.108)
- System.Drawing.Common (>= 10.0.0-preview.7.25380.108)
- System.IO.FileSystem.AccessControl (>= 5.0.0)
- System.IO.Packaging (>= 10.0.0-preview.7.25380.108)
- System.IO.Pipes.AccessControl (>= 5.0.0)
- System.IO.Ports (>= 10.0.0-preview.7.25380.108)
- System.Management (>= 10.0.0-preview.7.25380.108)
- System.Reflection.Context (>= 10.0.0-preview.7.25380.108)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.ILGeneration (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Runtime.Caching (>= 10.0.0-preview.7.25380.108)
- System.Security.AccessControl (>= 6.0.0)
- System.Security.Cryptography.Cng (>= 5.0.0)
- System.Security.Cryptography.Pkcs (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.ProtectedData (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.Xml (>= 10.0.0-preview.7.25380.108)
- System.Security.Permissions (>= 10.0.0-preview.7.25380.108)
- System.Security.Principal.Windows (>= 5.0.0)
- System.ServiceModel.Http (>= 8.1.2)
- System.ServiceModel.NetTcp (>= 8.1.2)
- System.ServiceModel.Primitives (>= 8.1.2)
- System.ServiceModel.Syndication (>= 10.0.0-preview.7.25380.108)
- System.ServiceProcess.ServiceController (>= 10.0.0-preview.7.25380.108)
- System.Speech (>= 10.0.0-preview.7.25380.108)
- System.Text.Encoding.CodePages (>= 10.0.0-preview.7.25380.108)
- System.Threading.AccessControl (>= 10.0.0-preview.7.25380.108)
- System.Web.Services.Description (>= 8.1.2)
-
.NETStandard 2.1
- Microsoft.Win32.Registry (>= 5.0.0)
- Microsoft.Win32.Registry.AccessControl (>= 10.0.0-preview.7.25380.108)
- Microsoft.Win32.SystemEvents (>= 10.0.0-preview.7.25380.108)
- System.CodeDom (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition.Registration (>= 10.0.0-preview.7.25380.108)
- System.Configuration.ConfigurationManager (>= 10.0.0-preview.7.25380.108)
- System.Data.DataSetExtensions (>= 4.5.0)
- System.Data.Odbc (>= 10.0.0-preview.7.25380.108)
- System.Data.OleDb (>= 10.0.0-preview.7.25380.108)
- System.Data.SqlClient (>= 4.9.0)
- System.Diagnostics.EventLog (>= 10.0.0-preview.7.25380.108)
- System.Diagnostics.PerformanceCounter (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.AccountManagement (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.Protocols (>= 10.0.0-preview.7.25380.108)
- System.Drawing.Common (>= 10.0.0-preview.7.25380.108)
- System.IO.FileSystem.AccessControl (>= 5.0.0)
- System.IO.Packaging (>= 10.0.0-preview.7.25380.108)
- System.IO.Pipes.AccessControl (>= 5.0.0)
- System.IO.Ports (>= 10.0.0-preview.7.25380.108)
- System.Management (>= 10.0.0-preview.7.25380.108)
- System.Reflection.Context (>= 10.0.0-preview.7.25380.108)
- System.Runtime.Caching (>= 10.0.0-preview.7.25380.108)
- System.Security.AccessControl (>= 6.0.0)
- System.Security.Cryptography.Cng (>= 5.0.0)
- System.Security.Cryptography.Pkcs (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.ProtectedData (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.Xml (>= 10.0.0-preview.7.25380.108)
- System.Security.Permissions (>= 10.0.0-preview.7.25380.108)
- System.Security.Principal.Windows (>= 5.0.0)
- System.ServiceModel.Http (>= 8.1.2)
- System.ServiceModel.NetTcp (>= 8.1.2)
- System.ServiceModel.Primitives (>= 8.1.2)
- System.ServiceModel.Syndication (>= 10.0.0-preview.7.25380.108)
- System.ServiceProcess.ServiceController (>= 10.0.0-preview.7.25380.108)
- System.Speech (>= 10.0.0-preview.7.25380.108)
- System.Text.Encoding.CodePages (>= 10.0.0-preview.7.25380.108)
- System.Threading.AccessControl (>= 10.0.0-preview.7.25380.108)
- System.Web.Services.Description (>= 8.1.2)
-
net10.0
- Microsoft.Win32.Registry.AccessControl (>= 10.0.0-preview.7.25380.108)
- Microsoft.Win32.SystemEvents (>= 10.0.0-preview.7.25380.108)
- System.CodeDom (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition.Registration (>= 10.0.0-preview.7.25380.108)
- System.Configuration.ConfigurationManager (>= 10.0.0-preview.7.25380.108)
- System.Data.Odbc (>= 10.0.0-preview.7.25380.108)
- System.Data.OleDb (>= 10.0.0-preview.7.25380.108)
- System.Data.SqlClient (>= 4.9.0)
- System.Diagnostics.EventLog (>= 10.0.0-preview.7.25380.108)
- System.Diagnostics.PerformanceCounter (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.AccountManagement (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.Protocols (>= 10.0.0-preview.7.25380.108)
- System.Drawing.Common (>= 10.0.0-preview.7.25380.108)
- System.IO.Packaging (>= 10.0.0-preview.7.25380.108)
- System.IO.Ports (>= 10.0.0-preview.7.25380.108)
- System.Management (>= 10.0.0-preview.7.25380.108)
- System.Reflection.Context (>= 10.0.0-preview.7.25380.108)
- System.Runtime.Caching (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.Pkcs (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.ProtectedData (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.Xml (>= 10.0.0-preview.7.25380.108)
- System.Security.Permissions (>= 10.0.0-preview.7.25380.108)
- System.ServiceModel.Http (>= 8.1.2)
- System.ServiceModel.NetTcp (>= 8.1.2)
- System.ServiceModel.Primitives (>= 8.1.2)
- System.ServiceModel.Syndication (>= 10.0.0-preview.7.25380.108)
- System.ServiceProcess.ServiceController (>= 10.0.0-preview.7.25380.108)
- System.Speech (>= 10.0.0-preview.7.25380.108)
- System.Text.Encoding.CodePages (>= 10.0.0-preview.7.25380.108)
- System.Web.Services.Description (>= 8.1.2)
-
net8.0
- Microsoft.Win32.Registry.AccessControl (>= 10.0.0-preview.7.25380.108)
- Microsoft.Win32.SystemEvents (>= 10.0.0-preview.7.25380.108)
- System.CodeDom (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition.Registration (>= 10.0.0-preview.7.25380.108)
- System.Configuration.ConfigurationManager (>= 10.0.0-preview.7.25380.108)
- System.Data.Odbc (>= 10.0.0-preview.7.25380.108)
- System.Data.OleDb (>= 10.0.0-preview.7.25380.108)
- System.Data.SqlClient (>= 4.9.0)
- System.Diagnostics.EventLog (>= 10.0.0-preview.7.25380.108)
- System.Diagnostics.PerformanceCounter (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.AccountManagement (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.Protocols (>= 10.0.0-preview.7.25380.108)
- System.Drawing.Common (>= 10.0.0-preview.7.25380.108)
- System.IO.Packaging (>= 10.0.0-preview.7.25380.108)
- System.IO.Ports (>= 10.0.0-preview.7.25380.108)
- System.Management (>= 10.0.0-preview.7.25380.108)
- System.Reflection.Context (>= 10.0.0-preview.7.25380.108)
- System.Runtime.Caching (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.Pkcs (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.ProtectedData (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.Xml (>= 10.0.0-preview.7.25380.108)
- System.Security.Permissions (>= 10.0.0-preview.7.25380.108)
- System.ServiceModel.Http (>= 8.1.2)
- System.ServiceModel.NetTcp (>= 8.1.2)
- System.ServiceModel.Primitives (>= 8.1.2)
- System.ServiceModel.Syndication (>= 10.0.0-preview.7.25380.108)
- System.ServiceProcess.ServiceController (>= 10.0.0-preview.7.25380.108)
- System.Speech (>= 10.0.0-preview.7.25380.108)
- System.Text.Encoding.CodePages (>= 10.0.0-preview.7.25380.108)
- System.Threading.AccessControl (>= 10.0.0-preview.7.25380.108)
- System.Web.Services.Description (>= 8.1.2)
-
net9.0
- Microsoft.Win32.Registry.AccessControl (>= 10.0.0-preview.7.25380.108)
- Microsoft.Win32.SystemEvents (>= 10.0.0-preview.7.25380.108)
- System.CodeDom (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition (>= 10.0.0-preview.7.25380.108)
- System.ComponentModel.Composition.Registration (>= 10.0.0-preview.7.25380.108)
- System.Configuration.ConfigurationManager (>= 10.0.0-preview.7.25380.108)
- System.Data.Odbc (>= 10.0.0-preview.7.25380.108)
- System.Data.OleDb (>= 10.0.0-preview.7.25380.108)
- System.Data.SqlClient (>= 4.9.0)
- System.Diagnostics.EventLog (>= 10.0.0-preview.7.25380.108)
- System.Diagnostics.PerformanceCounter (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.AccountManagement (>= 10.0.0-preview.7.25380.108)
- System.DirectoryServices.Protocols (>= 10.0.0-preview.7.25380.108)
- System.Drawing.Common (>= 10.0.0-preview.7.25380.108)
- System.IO.Packaging (>= 10.0.0-preview.7.25380.108)
- System.IO.Ports (>= 10.0.0-preview.7.25380.108)
- System.Management (>= 10.0.0-preview.7.25380.108)
- System.Reflection.Context (>= 10.0.0-preview.7.25380.108)
- System.Runtime.Caching (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.Pkcs (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.ProtectedData (>= 10.0.0-preview.7.25380.108)
- System.Security.Cryptography.Xml (>= 10.0.0-preview.7.25380.108)
- System.Security.Permissions (>= 10.0.0-preview.7.25380.108)
- System.ServiceModel.Http (>= 8.1.2)
- System.ServiceModel.NetTcp (>= 8.1.2)
- System.ServiceModel.Primitives (>= 8.1.2)
- System.ServiceModel.Syndication (>= 10.0.0-preview.7.25380.108)
- System.ServiceProcess.ServiceController (>= 10.0.0-preview.7.25380.108)
- System.Speech (>= 10.0.0-preview.7.25380.108)
- System.Text.Encoding.CodePages (>= 10.0.0-preview.7.25380.108)
- System.Threading.AccessControl (>= 10.0.0-preview.7.25380.108)
- System.Web.Services.Description (>= 8.1.2)
GitHub repositories (96)
Showing the top 20 popular GitHub repositories that depend on Microsoft.Windows.Compatibility:
Repository | Stars |
---|---|
microsoft/PowerToys
Windows system utilities to maximize productivity
|
|
PowerShell/PowerShell
PowerShell for every system!
|
|
NickeManarin/ScreenToGif
🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
|
|
unoplatform/uno
Open-source platform for building cross-platform native Mobile, Web, Desktop and Embedded apps quickly. Create rich, C#/XAML, single-codebase apps from any IDE. Hot Reload included! 90m+ NuGet Downloads!!
|
|
subhra74/xdm
Powerfull download accelerator and video downloader
|
|
PrismLibrary/Prism
Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications..
|
|
mono/SkiaSharp
SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
|
|
dotnet/samples
Sample code referenced by the .NET documentation
|
|
memstechtips/Winhance
Application designed to optimize and customize your Windows experience.
|
|
cairoshell/cairoshell
Cairo is a customizable, intuitive desktop environment for Windows.
|
|
RoundedTB/RoundedTB
Add margins, rounded corners and segments to your taskbars!
|
|
microsoft/AttackSurfaceAnalyzer
Attack Surface Analyzer can help you analyze your operating system's security configuration for changes during software installation.
|
|
thepirat000/Audit.NET
An extensible framework to audit executing operations in .NET and .NET Core.
|
|
NuGetPackageExplorer/NuGetPackageExplorer
Create, update and deploy Nuget Packages with a GUI
|
|
shaked6540/YoutubePlaylistDownloader
A tool to download whole playlists, channels or single videos from youtube and also optionally convert them to almost any format you would like
|
|
SteamAutoCracks/Steam-auto-crack
Steam Game Automatic Cracker
|
|
ArduPilot/MissionPlanner
Mission Planner Ground Control Station for ArduPilot (c# .net)
|
|
zsh2401/AutumnBox
图形化ADB工具箱
|
|
MCCTeam/Minecraft-Console-Client
Lightweight console for Minecraft chat and automated scripts
|
|
imDema/FreeMove
Move directories without breaking shortcuts or installations
|
Version | Downloads | Last Updated |
---|---|---|
10.0.0-preview.7.25380.108 | 0 | 8/11/2025 |
10.0.0-preview.7.25380.105 | 0 | 8/6/2025 |
10.0.0-preview.6.25358.103 | 0 | 7/17/2025 |
10.0.0-preview.6.25321.102 | 0 | 6/25/2025 |
10.0.0-preview.5.25280.105 | 0 | 6/2/2025 |
10.0.0-preview.5.25277.114 | 0 | 6/3/2025 |
10.0.0-preview.5.25277.101 | 0 | 5/29/2025 |
10.0.0-preview.5.25266.103 | 0 | 5/20/2025 |
10.0.0-preview.4.25255.103 | 0 | 5/12/2025 |
9.0.7 | 0 | 7/11/2025 |
2.1.0-preview.19073.11 | 2 | 1/28/2019 |
2.1.0-preview.18571.3 | 1 | 11/30/2018 |