Search code examples
packagenuget.net-6.0.net-7.0

Why there is no version 6.0.0 final of Microsoft.Win32.Registry nuget package?


The latest version of the Microsoft.Win32.Registry package is 6.0.0-preview.5.21301.5 released on 15th June 2021 and there is no .NET 7.0 preview version as well. However the Microsoft doc explains that the class Microsoft.Win32.Registry is available for .NET 6.0 and .NET 7.0 preview in the assembly Microsoft.Win32.Registry.dll.

The package System.Security.Principal.Windows has exactly the same versioning issue while the doc says that the class System.Security.Principal.WindowsPrincipal is available for .NET 6.0 and .NET 7.0 preview in the assembly System.Security.Principal.Windows.dll.

On the other hand the package System.Management for example is available for .NET 6.0 and .NET 7.0 preview.

What is happening with Microsoft.Win32.Registry and System.Security.Principal.Windows packages?


Solution

  • For Microsoft.Win32.Registry change your target framework to net6.0-windows - as answered in this discussion:

    You shouldn't need an extra package. If you set <TargetFramework>net6.0-windows</TargetFramework> in your .csproj, you should get access to those types.