Microsoft.Windows.Compatibility 11.0.0-rc.3.26522.148

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:

Feedback

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

Showing the top 20 packages that depend on Microsoft.Windows.Compatibility.

Packages Downloads
Verify
Enables verification of complex models and documents.
48
Verify
Enables simple verification of complex models and documents.
47
Verify
Enables verification of complex models and documents.
47
Verify
Enables verification of complex models and documents.
46
Verify
Enables verification of complex models and documents.
45
Verify
Enables simple verification of complex models and documents.
44
Verify
Enables verification of complex models and documents.
44

.NET 10.0

.NET 11.0

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
11.0.0-rc.3.26522.148 11 10/25/2026
11.0.0-rc.2.26504.105 15 10/14/2026
11.0.0-rc.1.26425.128 26 09/10/2026
11.0.0-preview.7.26381.103 25 08/12/2026
11.0.0-preview.6.26359.118 25 07/16/2026
11.0.0-preview.5.26302.115 33 06/11/2026
11.0.0-preview.4.26230.115 33 05/14/2026
11.0.0-preview.3.26207.106 48 04/16/2026
11.0.0-preview.2.26159.112 50 03/11/2026
11.0.0-preview.1.26104.118 40 02/13/2026
10.0.14 10 10/25/2026
10.0.13 11 10/14/2026
10.0.12 20 09/10/2026
10.0.11 23 08/12/2026
10.0.10 26 07/16/2026
10.0.9 27 06/11/2026
10.0.8 33 05/14/2026
10.0.7 45 04/22/2026
10.0.6 46 04/16/2026
10.0.5 40 03/13/2026
10.0.4 54 03/11/2026
10.0.3 42 02/12/2026
10.0.2 53 01/15/2026
10.0.1 57 12/11/2025
10.0.0 8 09/28/2026
10.0.0-rc.2.25502.107 50 12/13/2025
10.0.0-rc.1.25451.107 43 12/13/2025
10.0.0-preview.7.25380.108 36 12/19/2025
10.0.0-preview.6.25358.103 28 12/13/2025
10.0.0-preview.5.25277.114 51 12/18/2025
10.0.0-preview.4.25258.110 45 12/11/2025
10.0.0-preview.3.25174.1 40 12/19/2025
10.0.0-preview.2.25163.3 28 12/21/2025
10.0.0-preview.1.25080.4 30 12/14/2025
9.0.22 9 10/25/2026
9.0.21 13 10/14/2026
9.0.20 23 09/10/2026
9.0.19 24 08/12/2026
9.0.18 26 07/16/2026
9.0.17 25 06/11/2026
9.0.16 35 05/14/2026
9.0.15 44 04/16/2026
9.0.14 50 03/11/2026
9.0.13 48 02/12/2026
9.0.12 54 01/15/2026
9.0.11 40 12/15/2025
9.0.10 46 12/14/2025
9.0.9 50 12/13/2025
9.0.8 47 12/17/2025
9.0.7 46 12/13/2025
9.0.6 56 12/14/2025
9.0.5 52 12/11/2025
9.0.4 37 12/19/2025
9.0.3 45 12/12/2025
9.0.2 44 12/11/2025
9.0.1 36 12/11/2025
9.0.0 49 12/12/2025
9.0.0-rc.2.24474.4 41 12/11/2025
9.0.0-rc.1.24452.1 36 12/19/2025
9.0.0-preview.7.24405.2 47 12/14/2025
9.0.0-preview.6.24327.6 47 12/21/2025
9.0.0-preview.5.24306.8 49 12/16/2025
9.0.0-preview.4.24267.11 37 12/21/2025
9.0.0-preview.3.24175.3 43 12/16/2025
9.0.0-preview.2.24128.10 49 12/21/2025
9.0.0-preview.1.24081.3 9 09/28/2026
8.0.33 8 10/25/2026
8.0.32 16 10/14/2026
8.0.31 22 09/11/2026
8.0.30 24 08/12/2026
8.0.29 26 07/16/2026
8.0.28 27 06/11/2026
8.0.27 31 05/14/2026
8.0.26 45 04/16/2026
8.0.25 38 03/11/2026
8.0.24 52 02/12/2026
8.0.23 50 01/15/2026
8.0.22 47 12/14/2025
8.0.21 48 12/16/2025
8.0.20 38 01/12/2026
8.0.19 48 12/15/2025
8.0.18 45 12/11/2025
8.0.17 39 12/13/2025
8.0.16 44 12/12/2025
8.0.15 54 12/19/2025
8.0.14 49 12/11/2025
8.0.13 40 12/19/2025
8.0.12 52 12/12/2025
8.0.11 40 12/21/2025
8.0.10 38 12/20/2025
8.0.8 54 12/11/2025
8.0.7 45 01/10/2026
8.0.6 44 12/14/2025
8.0.5 48 12/18/2025
8.0.4 42 12/22/2025
8.0.3 41 12/17/2025
8.0.2 55 12/14/2025
8.0.1 42 12/11/2025
8.0.0 48 12/11/2025
8.0.0-rc.2.23479.10 45 12/12/2025
8.0.0-rc.1.23420.5 46 12/21/2025
8.0.0-preview.7.23376.1 49 12/11/2025
8.0.0-preview.6.23329.4 45 12/14/2025
8.0.0-preview.5.23302.2 47 12/21/2025
8.0.0-preview.4.23260.1 46 12/14/2025
8.0.0-preview.3.23174.8 48 12/15/2025
8.0.0-preview.2.23128.3 47 12/13/2025
8.0.0-preview.1.23110.8 46 12/21/2025
7.0.6 51 12/18/2025
7.0.5 49 12/19/2025
7.0.4 53 12/24/2025
7.0.3 46 12/12/2025
7.0.1 41 12/12/2025
7.0.0 41 01/08/2026
7.0.0-rc.2.22472.3 51 12/21/2025
7.0.0-rc.1.22426.10 44 12/18/2025
7.0.0-preview.7.22375.6 53 12/16/2025
7.0.0-preview.6.22324.4 42 12/21/2025
7.0.0-preview.5.22301.12 42 12/14/2025
7.0.0-preview.4.22229.4 51 12/21/2025
7.0.0-preview.3.22175.4 44 12/14/2025
7.0.0-preview.2.22152.2 50 12/21/2025
7.0.0-preview.1.22076.8 53 12/16/2025
6.0.9 49 12/12/2025
6.0.8 45 12/16/2025
6.0.7 49 12/23/2025
6.0.6 50 12/30/2025
6.0.4 60 12/15/2025
6.0.3 51 12/19/2025
6.0.2 42 12/12/2025
6.0.2-mauipre.1.22102.15 34 12/11/2025
6.0.2-mauipre.1.22054.8 38 12/15/2025
6.0.1 43 12/13/2025
6.0.0 46 12/15/2025
6.0.0-rc.2.21480.5 45 12/16/2025
6.0.0-rc.1.21451.13 34 12/11/2025
6.0.0-preview.7.21377.19 40 12/21/2025
6.0.0-preview.6.21352.13 51 12/19/2025
6.0.0-preview.5.21301.5 41 12/21/2025
6.0.0-preview.4.21253.7 38 12/21/2025
6.0.0-preview.3.21201.4 33 12/14/2025
6.0.0-preview.2.21154.6 39 12/21/2025
6.0.0-preview.1.21102.12 32 12/14/2025
5.0.2 51 12/11/2025
5.0.1 53 12/12/2025
5.0.0 54 12/12/2025
5.0.0-rc.2.20475.5 49 12/11/2025
5.0.0-rc.1.20451.14 53 12/18/2025
5.0.0-preview.8.20407.11 47 12/21/2025
5.0.0-preview.7.20364.11 38 12/15/2025
5.0.0-preview.6.20305.6 42 12/21/2025
5.0.0-preview.5.20278.1 48 12/21/2025
5.0.0-preview.4.20251.6 62 12/15/2025
5.0.0-preview.3.20214.6 48 12/11/2025
5.0.0-preview.2.20160.6 41 12/21/2025
5.0.0-preview.1.20120.5 50 12/15/2025
3.1.5 36 12/12/2025
3.1.4 47 12/12/2025
3.1.2 49 12/16/2025
3.1.1 13 09/28/2026
3.1.0 51 12/12/2025
3.1.0-preview3.19551.4 34 12/21/2025
3.1.0-preview2.19523.17 58 12/16/2025
3.1.0-preview1.19504.10 56 12/15/2025
3.0.1 5 10/05/2026
3.0.0 45 12/13/2025
3.0.0-rc1.19456.4 35 12/21/2025
3.0.0-preview9.19421.4 48 12/20/2025
3.0.0-preview9.19416.11 49 12/19/2025
3.0.0-preview8.19405.3 53 12/21/2025
3.0.0-preview7.19362.9 44 12/21/2025
3.0.0-preview6.19303.8 42 12/15/2025
3.0.0-preview6.19264.9 47 12/21/2025
3.0.0-preview5.19224.8 31 12/15/2025
3.0.0-preview4.19212.13 48 12/19/2025
2.1.1 10 10/03/2026
2.1.0-preview3.19128.7 45 12/15/2025
2.1.0-preview.19073.11 36 12/21/2025
2.1.0-preview.18571.3 51 12/19/2025
2.0.1 47 12/15/2025
2.0.0 48 12/11/2025
2.0.0-rc1 42 12/20/2025
2.0.0-preview2-26406-04 54 12/21/2025
2.0.0-preview1-26216-02 47 12/15/2025
2.0.0-preview1-25914-04 43 12/21/2025