Microsoft.Windows.Compatibility 11.0.0-rc.1.26425.128

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.
40
Verify
Enables verification of complex models and documents.
38
Verify
Enables verification of complex models and documents.
37
Verify
Enables verification of complex models and documents.
36
Verify
Enables simple verification of complex models and documents.
35
Verify
Enables verification of complex models and documents.
35

.NET 10.0

.NET 11.0

.NET Standard 2.0

.NET Standard 2.1

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