What fixed it for me is, in VIsual Studio, Solution Explorer, right click and Add Reference… on Programs->Automation->HoloLens.Automation->References:
and in the Browse section, which was initially an empty list, click on browse:
and locate the Windows.winmd file from the desired Windows SDK.
Note - You will need to change the file type to All Files, and by default installation they are usually located in C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.20348.0 or similar folder.
Hope this helps