Microsoft.Windows.Compatibility
9.0.0
Prefix Reserved
dotnet add package Microsoft.Windows.Compatibility --version 9.0.0
NuGet\Install-Package Microsoft.Windows.Compatibility -Version 9.0.0
<PackageReference Include="Microsoft.Windows.Compatibility" Version="9.0.0" />
paket add Microsoft.Windows.Compatibility --version 9.0.0
#r "nuget: Microsoft.Windows.Compatibility, 9.0.0"
// Install Microsoft.Windows.Compatibility as a Cake Addin #addin nuget:?package=Microsoft.Windows.Compatibility&version=9.0.0 // Install Microsoft.Windows.Compatibility as a Cake Tool #tool nuget:?package=Microsoft.Windows.Compatibility&version=9.0.0
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 (>= 9.0.0)
- Microsoft.Win32.SystemEvents (>= 9.0.0)
- System.CodeDom (>= 9.0.0)
- System.ComponentModel.Composition (>= 9.0.0)
- System.Configuration.ConfigurationManager (>= 9.0.0)
- System.Data.DataSetExtensions (>= 4.5.0)
- System.Data.Odbc (>= 9.0.0)
- System.Data.OleDb (>= 9.0.0)
- System.Data.SqlClient (>= 4.8.6)
- System.Diagnostics.EventLog (>= 9.0.0)
- System.Diagnostics.PerformanceCounter (>= 9.0.0)
- System.DirectoryServices (>= 9.0.0)
- System.DirectoryServices.AccountManagement (>= 9.0.0)
- System.DirectoryServices.Protocols (>= 9.0.0)
- System.Drawing.Common (>= 9.0.0)
- System.IO.FileSystem.AccessControl (>= 5.0.0)
- System.IO.Packaging (>= 9.0.0)
- System.IO.Pipes.AccessControl (>= 5.0.0)
- System.IO.Ports (>= 9.0.0)
- System.Management (>= 9.0.0)
- System.Reflection.Context (>= 9.0.0)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.ILGeneration (>= 4.7.0)
- System.Reflection.Emit.Lightweight (>= 4.7.0)
- System.Runtime.Caching (>= 9.0.0)
- System.Security.AccessControl (>= 6.0.0)
- System.Security.Cryptography.Cng (>= 5.0.0)
- System.Security.Cryptography.Pkcs (>= 9.0.0)
- System.Security.Cryptography.ProtectedData (>= 9.0.0)
- System.Security.Cryptography.Xml (>= 9.0.0)
- System.Security.Permissions (>= 9.0.0)
- System.Security.Principal.Windows (>= 5.0.0)
- System.ServiceModel.Duplex (>= 4.10.0)
- System.ServiceModel.Http (>= 4.10.0)
- System.ServiceModel.NetTcp (>= 4.10.0)
- System.ServiceModel.Primitives (>= 4.10.0)
- System.ServiceModel.Security (>= 4.10.0)
- System.ServiceModel.Syndication (>= 9.0.0)
- System.ServiceProcess.ServiceController (>= 9.0.0)
- System.Speech (>= 9.0.0)
- System.Text.Encoding.CodePages (>= 9.0.0)
- System.Threading.AccessControl (>= 9.0.0)
- System.Web.Services.Description (>= 4.10.0)
-
.NETStandard 2.1
- Microsoft.Win32.Registry (>= 5.0.0)
- Microsoft.Win32.Registry.AccessControl (>= 9.0.0)
- Microsoft.Win32.SystemEvents (>= 9.0.0)
- System.CodeDom (>= 9.0.0)
- System.ComponentModel.Composition (>= 9.0.0)
- System.ComponentModel.Composition.Registration (>= 9.0.0)
- System.Configuration.ConfigurationManager (>= 9.0.0)
- System.Data.DataSetExtensions (>= 4.5.0)
- System.Data.Odbc (>= 9.0.0)
- System.Data.OleDb (>= 9.0.0)
- System.Data.SqlClient (>= 4.8.6)
- System.Diagnostics.EventLog (>= 9.0.0)
- System.Diagnostics.PerformanceCounter (>= 9.0.0)
- System.DirectoryServices (>= 9.0.0)
- System.DirectoryServices.AccountManagement (>= 9.0.0)
- System.DirectoryServices.Protocols (>= 9.0.0)
- System.Drawing.Common (>= 9.0.0)
- System.IO.FileSystem.AccessControl (>= 5.0.0)
- System.IO.Packaging (>= 9.0.0)
- System.IO.Pipes.AccessControl (>= 5.0.0)
- System.IO.Ports (>= 9.0.0)
- System.Management (>= 9.0.0)
- System.Reflection.Context (>= 9.0.0)
- System.Runtime.Caching (>= 9.0.0)
- System.Security.AccessControl (>= 6.0.0)
- System.Security.Cryptography.Cng (>= 5.0.0)
- System.Security.Cryptography.Pkcs (>= 9.0.0)
- System.Security.Cryptography.ProtectedData (>= 9.0.0)
- System.Security.Cryptography.Xml (>= 9.0.0)
- System.Security.Permissions (>= 9.0.0)
- System.Security.Principal.Windows (>= 5.0.0)
- System.ServiceModel.Duplex (>= 4.10.0)
- System.ServiceModel.Http (>= 4.10.0)
- System.ServiceModel.NetTcp (>= 4.10.0)
- System.ServiceModel.Primitives (>= 4.10.0)
- System.ServiceModel.Security (>= 4.10.0)
- System.ServiceModel.Syndication (>= 9.0.0)
- System.ServiceProcess.ServiceController (>= 9.0.0)
- System.Speech (>= 9.0.0)
- System.Text.Encoding.CodePages (>= 9.0.0)
- System.Threading.AccessControl (>= 9.0.0)
- System.Web.Services.Description (>= 4.10.0)
-
net8.0
- Microsoft.Win32.Registry (>= 5.0.0)
- Microsoft.Win32.Registry.AccessControl (>= 9.0.0)
- Microsoft.Win32.SystemEvents (>= 9.0.0)
- System.CodeDom (>= 9.0.0)
- System.ComponentModel.Composition (>= 9.0.0)
- System.ComponentModel.Composition.Registration (>= 9.0.0)
- System.Configuration.ConfigurationManager (>= 9.0.0)
- System.Data.Odbc (>= 9.0.0)
- System.Data.OleDb (>= 9.0.0)
- System.Data.SqlClient (>= 4.8.6)
- System.Diagnostics.EventLog (>= 9.0.0)
- System.Diagnostics.PerformanceCounter (>= 9.0.0)
- System.DirectoryServices (>= 9.0.0)
- System.DirectoryServices.AccountManagement (>= 9.0.0)
- System.DirectoryServices.Protocols (>= 9.0.0)
- System.Drawing.Common (>= 9.0.0)
- System.IO.Packaging (>= 9.0.0)
- System.IO.Ports (>= 9.0.0)
- System.Management (>= 9.0.0)
- System.Reflection.Context (>= 9.0.0)
- System.Runtime.Caching (>= 9.0.0)
- System.Security.AccessControl (>= 6.0.0)
- System.Security.Cryptography.Pkcs (>= 9.0.0)
- System.Security.Cryptography.ProtectedData (>= 9.0.0)
- System.Security.Cryptography.Xml (>= 9.0.0)
- System.Security.Permissions (>= 9.0.0)
- System.Security.Principal.Windows (>= 5.0.0)
- System.ServiceModel.Duplex (>= 4.10.0)
- System.ServiceModel.Http (>= 4.10.0)
- System.ServiceModel.NetTcp (>= 4.10.0)
- System.ServiceModel.Primitives (>= 4.10.0)
- System.ServiceModel.Security (>= 4.10.0)
- System.ServiceModel.Syndication (>= 9.0.0)
- System.ServiceProcess.ServiceController (>= 9.0.0)
- System.Speech (>= 9.0.0)
- System.Text.Encoding.CodePages (>= 9.0.0)
- System.Threading.AccessControl (>= 9.0.0)
- System.Web.Services.Description (>= 4.10.0)
-
net9.0
- Microsoft.Win32.Registry (>= 5.0.0)
- Microsoft.Win32.Registry.AccessControl (>= 9.0.0)
- Microsoft.Win32.SystemEvents (>= 9.0.0)
- System.CodeDom (>= 9.0.0)
- System.ComponentModel.Composition (>= 9.0.0)
- System.ComponentModel.Composition.Registration (>= 9.0.0)
- System.Configuration.ConfigurationManager (>= 9.0.0)
- System.Data.Odbc (>= 9.0.0)
- System.Data.OleDb (>= 9.0.0)
- System.Data.SqlClient (>= 4.8.6)
- System.Diagnostics.EventLog (>= 9.0.0)
- System.Diagnostics.PerformanceCounter (>= 9.0.0)
- System.DirectoryServices (>= 9.0.0)
- System.DirectoryServices.AccountManagement (>= 9.0.0)
- System.DirectoryServices.Protocols (>= 9.0.0)
- System.Drawing.Common (>= 9.0.0)
- System.IO.Packaging (>= 9.0.0)
- System.IO.Ports (>= 9.0.0)
- System.Management (>= 9.0.0)
- System.Reflection.Context (>= 9.0.0)
- System.Runtime.Caching (>= 9.0.0)
- System.Security.AccessControl (>= 6.0.0)
- System.Security.Cryptography.Pkcs (>= 9.0.0)
- System.Security.Cryptography.ProtectedData (>= 9.0.0)
- System.Security.Cryptography.Xml (>= 9.0.0)
- System.Security.Permissions (>= 9.0.0)
- System.Security.Principal.Windows (>= 5.0.0)
- System.ServiceModel.Duplex (>= 4.10.0)
- System.ServiceModel.Http (>= 4.10.0)
- System.ServiceModel.NetTcp (>= 4.10.0)
- System.ServiceModel.Primitives (>= 4.10.0)
- System.ServiceModel.Security (>= 4.10.0)
- System.ServiceModel.Syndication (>= 9.0.0)
- System.ServiceProcess.ServiceController (>= 9.0.0)
- System.Speech (>= 9.0.0)
- System.Text.Encoding.CodePages (>= 9.0.0)
- System.Threading.AccessControl (>= 9.0.0)
- System.Web.Services.Description (>= 4.10.0)
NuGet packages (212)
Showing the top 5 NuGet packages that depend on Microsoft.Windows.Compatibility:
Package | Downloads |
---|---|
Microsoft.PowerShell.SDK
Runtime for hosting PowerShell |
|
Caliburn.Micro
A small, yet powerful framework designed for Xaml platforms, Caliburn.Micro implements a variety of UI patterns for solving real-world problems. Patterns that are highlighted include MVVM (Presentation Model), MVP and MVC. |
|
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 2024 Syncfusion, Inc. All Rights Reserved. The Syncfusion Bold Reports license and copyright applies to this distribution. |
|
Microsoft.PowerPlatform.ResourceStack
The Resource stack storage client libraries |
|
Alachisoft.NCache.SDK
This NCache SDK NuGet package is a complete package for using NCache Enterprise from .NET Framework and .NET Core applications. |
GitHub repositories (98)
Showing the top 5 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
|
Version | Downloads | Last updated | |
---|---|---|---|
9.0.0 | 8,413 | 11/12/2024 | |
9.0.0-rc.2.24474.4 | 15,789 | 10/8/2024 | |
9.0.0-rc.1.24452.1 | 7,097 | 9/10/2024 | |
9.0.0-preview.7.24405.2 | 5,597 | 8/13/2024 | |
9.0.0-preview.6.24327.6 | 10,329 | 7/9/2024 | |
9.0.0-preview.5.24306.8 | 4,811 | 6/11/2024 | |
9.0.0-preview.4.24267.11 | 2,461 | 5/21/2024 | |
9.0.0-preview.3.24175.3 | 7,278 | 4/11/2024 | |
9.0.0-preview.2.24128.10 | 734 | 3/12/2024 | |
9.0.0-preview.1.24081.3 | 13,330 | 2/13/2024 | |
8.0.11 | 6,203 | 11/12/2024 | |
8.0.10 | 163,792 | 10/8/2024 | |
8.0.8 | 372,197 | 8/13/2024 | |
8.0.7 | 229,423 | 7/9/2024 | |
8.0.6 | 262,872 | 5/28/2024 | |
8.0.5 | 54,914 | 5/14/2024 | |
8.0.4 | 417,969 | 4/9/2024 | |
8.0.3 | 171,901 | 3/12/2024 | |
8.0.2 | 172,933 | 2/13/2024 | |
8.0.1 | 619,970 | 1/9/2024 | |
8.0.0 | 1,127,963 | 11/14/2023 | |
8.0.0-rc.2.23479.10 | 11,784 | 10/10/2023 | |
8.0.0-rc.1.23420.5 | 8,652 | 9/12/2023 | |
8.0.0-preview.7.23376.1 | 9,233 | 8/8/2023 | |
8.0.0-preview.6.23329.4 | 847 | 7/11/2023 | |
8.0.0-preview.5.23302.2 | 833 | 6/13/2023 | |
8.0.0-preview.4.23260.1 | 10,046 | 5/16/2023 | |
8.0.0-preview.3.23174.8 | 19,444 | 4/11/2023 | |
8.0.0-preview.2.23128.3 | 2,759 | 3/14/2023 | |
8.0.0-preview.1.23110.8 | 8,064 | 2/21/2023 | |
7.0.6 | 37,684 | 3/12/2024 | |
7.0.5 | 938,694 | 9/12/2023 | |
7.0.4 | 692,260 | 6/22/2023 | |
7.0.3 | 276,123 | 6/13/2023 | |
7.0.1 | 419,972 | 4/11/2023 | |
7.0.0 | 1,569,617 | 11/7/2022 | |
7.0.0-rc.2.22472.3 | 8,900 | 10/11/2022 | |
7.0.0-rc.1.22426.10 | 62,305 | 9/14/2022 | |
7.0.0-preview.7.22375.6 | 10,318 | 8/9/2022 | |
7.0.0-preview.6.22324.4 | 1,051 | 7/12/2022 | |
7.0.0-preview.5.22301.12 | 1,168 | 6/14/2022 | |
7.0.0-preview.4.22229.4 | 10,455 | 5/10/2022 | |
7.0.0-preview.3.22175.4 | 2,417 | 4/13/2022 | |
7.0.0-preview.2.22152.2 | 11,662 | 3/14/2022 | |
7.0.0-preview.1.22076.8 | 2,131 | 2/17/2022 | |
6.0.9 | 975 | 11/12/2024 | |
6.0.8 | 131,177 | 3/12/2024 | |
6.0.7 | 1,081,365 | 6/22/2023 | |
6.0.6 | 632,839 | 6/13/2023 | |
6.0.4 | 99,436 | 4/11/2023 | |
6.0.3 | 239,490 | 2/14/2023 | |
6.0.2 | 196,473 | 12/13/2022 | |
6.0.1 | 477,170 | 10/27/2022 | |
6.0.0 | 7,699,903 | 11/8/2021 | |
6.0.0-rc.2.21480.5 | 4,391 | 10/12/2021 | |
6.0.0-rc.1.21451.13 | 7,775 | 9/14/2021 | |
6.0.0-preview.7.21377.19 | 2,579 | 8/10/2021 | |
6.0.0-preview.6.21352.13 | 1,538 | 7/21/2021 | |
6.0.0-preview.5.21301.5 | 5,417 | 6/15/2021 | |
6.0.0-preview.4.21253.7 | 20,526 | 5/24/2021 | |
6.0.0-preview.3.21201.4 | 7,442 | 4/8/2021 | |
6.0.0-preview.2.21154.6 | 7,990 | 3/11/2021 | |
6.0.0-preview.1.21102.12 | 2,264 | 2/12/2021 | |
5.0.2 | 3,968,493 | 2/9/2021 | |
5.0.1 | 1,225,344 | 1/12/2021 | |
5.0.0 | 17,453,597 | 11/9/2020 | |
5.0.0-rc.2.20475.5 | 9,208 | 10/13/2020 | |
5.0.0-rc.1.20451.14 | 4,312 | 9/14/2020 | |
5.0.0-preview.8.20407.11 | 8,217 | 8/25/2020 | |
5.0.0-preview.7.20364.11 | 18,589 | 7/21/2020 | |
5.0.0-preview.6.20305.6 | 3,418 | 6/25/2020 | |
5.0.0-preview.5.20278.1 | 4,028 | 6/10/2020 | |
5.0.0-preview.4.20251.6 | 7,615 | 5/18/2020 | |
5.0.0-preview.3.20214.6 | 29,537 | 4/23/2020 | |
5.0.0-preview.2.20160.6 | 770 | 4/2/2020 | |
5.0.0-preview.1.20120.5 | 812 | 3/16/2020 | |
3.1.5 | 17,060 | 1/9/2024 | |
3.1.4 | 20,724 | 12/13/2022 | |
3.1.2 | 396,115 | 9/14/2021 | |
3.1.1 | 2,544,156 | 8/11/2020 | |
3.1.0 | 4,266,558 | 12/3/2019 | |
3.1.0-preview3.19551.4 | 1,122 | 11/13/2019 | |
3.1.0-preview2.19523.17 | 13,891 | 11/1/2019 | |
3.1.0-preview1.19504.10 | 9,761 | 10/15/2019 | |
3.0.1 | 94,812 | 11/18/2019 | |
3.0.0 | 936,853 | 9/23/2019 | |
3.0.0-rc1.19456.4 | 4,852 | 9/16/2019 | |
3.0.0-preview9.19421.4 | 2,685 | 9/4/2019 | |
3.0.0-preview9.19416.11 | 553 | 9/4/2019 | |
3.0.0-preview8.19405.3 | 5,583 | 8/13/2019 | |
3.0.0-preview7.19362.9 | 7,560 | 7/23/2019 | |
3.0.0-preview6.19303.8 | 36,373 | 6/12/2019 | |
3.0.0-preview6.19264.9 | 553 | 9/4/2019 | |
3.0.0-preview5.19224.8 | 24,548 | 5/6/2019 | |
3.0.0-preview4.19212.13 | 1,722 | 4/18/2019 | |
2.1.1 | 1,510,997 | 5/14/2019 | |
2.1.0-preview3.19128.7 | 7,250 | 3/6/2019 | |
2.1.0-preview.19073.11 | 13,849 | 1/29/2019 | |
2.1.0-preview.18571.3 | 13,659 | 12/3/2018 | |
2.0.1 | 6,442,099 | 8/21/2018 | |
2.0.0 | 1,442,718 | 5/29/2018 | |
2.0.0-rc1 | 44,057 | 5/6/2018 | |
2.0.0-preview2-26406-04 | 16,608 | 4/10/2018 | |
2.0.0-preview1-26216-02 | 24,978 | 2/26/2018 | |
2.0.0-preview1-25914-04 | 292,854 | 11/15/2017 |