XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'Microsoft.Win32.Registry.dll'

I was struggling with the same issue earlier and just managed to fix it by removing the .vs folder from the solution folder.

enter image description here

Note this folder is hidden by default, so you will need to enable showing hidden items from File Explorer.

Update

Here's a workaround from the Visual Studio Team before a proper fix comes out in the next SDK.

The Windows team investigated this issue, and like we suspected it was a known issue with the SDK that we already plan to address for the next release (we could not get this into the Fall Creators Update SDK). For now, unfortunately, you will need to make sure that the TargetPlatformMinVersion of all of the projects you have open in the same solution are identical.

Tags:

Winapi

Uwp