Microsoft.Windows.Compatibility 11.0.0-rc.2.26504.105

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.
44
Verify
Enables verification of complex models and documents.
43
Verify
Enables simple verification of complex models and documents.
43
Verify
Enables simple verification of complex models and documents.
42
Verify
Enables verification of complex models and documents.
42
Verify
Enables verification of complex models and documents.
41
Verify
Enables verification of complex models and documents.
40

.NET 10.0

.NET 11.0

.NET Standard 2.0

.NET Standard 2.1

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