Using Microsoft.Win32.Registry in a custom MSBuild task shipped via NuGet
Summary A custom MSBuild task attempted to read from the Windows Registry while targeting .NET Standard 2.0, causing MSBuild to load the .NET Standard stub version of Microsoft.Win32.Registry. That assembly contains no platform-specific implementation, leading to a PlatformNotSupportedException at runtime. Root Cause The failure occurs because: MSBuild running on .NET (Core/SDK-based) loads the .NET Standard … Read more