Microsoft.Windows.Compatibility 10.0.9 (original) (raw)

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:

Feedback

We value your feedback! Here are ways to get in touch with us:

NuGet packages (230)

Showing the top 5 NuGet packages that depend on Microsoft.Windows.Compatibility:

Package Downloads
Microsoft.PowerShell.SDK Runtime for hosting PowerShell 22.5M
Microsoft.PowerPlatform.ResourceStack The Resource stack storage client libraries 1.6M
BoldReports.Net.Core Syncfusion Bold Reports for ASP.NET Core is a server-side helper package used to build ASP.NET Core Web API services. Key features: • Users can interactively provide report parameter inputs at run time to display reports based on the parameter. • SQL Server RDL specification expressions are supported. • Built-in SQL Query designer with a convenient user interface to create and view relationships between tables easily. • A rich selection of built-in report items, including charts, grids, pivot grids, subreports, textboxes, images, lines, and rectangles for better visual representation of data. • Report viewer supports multilevel grouping and sorting in data regions of report items such as tablixes, matrices and lists. • Interactive features in RDL specification like drill through, hyperlink, and interactive sorting to work with report at runtime. • Preview the report in print layout prior to printing. Page settings can be modified using page setup dialog. • All static texts within the report viewer and report designer can be localized to any desired language. • Displayed reports can be exported to popular file formats: PDF, Word, Excel, and HTML. Learn more: https://www.boldreports.com/features?utm\_source=nuget&utm\_medium=listing Documentation: https://help.boldreports.com/embedded-reporting/aspnet-core-reporting?utm\_source=nuget&utm\_medium=listing Support Questions: mailto:support@boldreports.com?utm_source=nuget&utm_medium=listing This is a commercial product and requires a paid subscription license for possession or use. Syncfusion’s Bold Reports services, including this component, is subject to the terms and conditions of Syncfusion's Bold Reports Software License Agreement and Terms of Service (https://www.boldreports.com/terms-of-use/?utm\_source=nuget&utm\_medium=listing). To acquire a license, you can start a subscription or start a free 15-day trial here (https://www.boldreports.com/pricing/?utm\_source=nuget&utm\_medium=listing). This server-side helper package provides services to the following components and libraries: • ASP.NET Core Report Viewer: https://www.boldreports.com/embedded-reporting/aspnet-core-report-viewer?utm\_source=nuget&utm\_medium=listing • ASP.NET Core Report Designer: https://www.boldreports.com/embedded-reporting/aspnet-core-report-designer?utm\_source=nuget&utm\_medium=listing • ASP.NET Core Report Writer: https://www.boldreports.com/embedded-reporting/aspnet-core-report-writer?utm\_source=nuget&utm\_medium=listing • Blazor Report Viewer: https://www.boldreports.com/embedded-reporting/blazor-report-viewer?utm\_source=nuget&utm\_medium=listing • Blazor Report Designer: https://www.boldreports.com/embedded-reporting/blazor-report-designer?utm\_source=nuget&utm\_medium=listing • Angular Report Viewer: https://www.boldreports.com/embedded-reporting/angular-report-viewer?utm\_source=nuget&utm\_medium=listing • Angular Report Designer: https://www.boldreports.com/embedded-reporting/angular-report-designer?utm\_source=nuget&utm\_medium=listing • JavaScript Report Viewer: https://www.boldreports.com/embedded-reporting/javascript-report-viewer?utm\_source=nuget&utm\_medium=listing • JavaScript Report Designer: https://www.boldreports.com/embedded-reporting/javascript-report-designer?utm\_source=nuget&utm\_medium=listing © Copyright 2026 Syncfusion, Inc. All Rights Reserved. The Syncfusion Bold Reports license and copyright applies to this distribution. 1.6M
Alachisoft.NCache.SDK This NCache SDK NuGet package is a complete package for using NCache Enterprise from .NET Framework and .NET Core applications. 1.4M
Ewl The Enterprise Web Library (EWL), together with its tailored infrastructure platform, is a highly opinionated foundation for web-based enterprise software. 729.9K

GitHub repositories (92)

Showing the top 20 popular GitHub repositories that depend on Microsoft.Windows.Compatibility:

Repository Stars
PowerShell/PowerShell PowerShell for every system! 54.0K
NickeManarin/ScreenToGif 🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video. 27.1K
memstechtips/Winhance Application designed to optimize, customize and enhance your Windows experience. 11.1K
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!! 10.0K
subhra74/xdm Powerfull download accelerator and video downloader 7.8K
PrismLibrary/Prism Prism is a framework for building loosely coupled, maintainable, and testable XAML applications in WPF, Xamarin Forms, and Uno / Win UI Applications.. 6.8K
tixl3d/tixl TiXL is an open source software to create realtime motion graphics. 5.0K
dotnet/samples Sample code referenced by the .NET documentation 3.7K
cairoshell/cairoshell Cairo is a customizable, intuitive desktop environment for Windows. 3.3K
RoundedTB/RoundedTB Add margins, rounded corners and segments to your taskbars! 3.1K
SteamAutoCracks/Steam-auto-crack Steam Game Automatic Cracker 3.1K
microsoft/AttackSurfaceAnalyzer Attack Surface Analyzer can help you analyze your operating system's security configuration for changes during software installation. 2.9K
thepirat000/Audit.NET An extensible framework to audit executing operations in .NET 2.6K
PSAppDeployToolkit/PSAppDeployToolkit Project Homepage & Forums 2.3K
ProtonVPN/win-app Official ProtonVPN Windows app 2.3K
imDema/FreeMove Move directories without breaking shortcuts or installations 2.1K
MCCTeam/Minecraft-Console-Client Lightweight console for Minecraft chat and automated scripts. Currently supports up to Minecraft 26.1 2.1K
zsh2401/AutumnBox 图形化ADB工具箱 1.9K
UnderminersTeam/UndertaleModTool The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!) 1.9K
ariacom/Seal-Report Database Reporting Tool and Tasks (.Net) 1.6K

Include prerelease

Include vulnerable

Include deprecated

Version Downloads Last Updated
11.0.0-preview.5.26302.115 563 6/9/2026
11.0.0-preview.4.26230.115 1,263 5/12/2026
11.0.0-preview.3.26207.106 2,267 4/14/2026
11.0.0-preview.2.26159.112 1,776 3/10/2026
11.0.0-preview.1.26104.118 2,978 2/10/2026
10.0.9 15,878 6/9/2026
10.0.8 74,009 5/12/2026
10.0.7 125,804 4/21/2026
10.0.6 40,476 4/14/2026
10.0.5 244,425 3/12/2026
10.0.4 13,740 3/10/2026
9.0.17 2,335 6/9/2026
9.0.16 12,346 5/12/2026
9.0.15 38,960 4/14/2026
9.0.14 62,512 3/10/2026
9.0.13 9,600 2/10/2026
8.0.28 932 6/9/2026
8.0.27 5,838 5/12/2026
8.0.26 18,431 4/14/2026
8.0.25 38,787 3/10/2026