Visual Studio 2019 is not showing Device target option for UWP

I am following the Unity development tutorial for Hololens 2.

https://docs.microsoft.com/en-us/windows/mixed-reality/develop/unity/unity-development-overview?tabs=mrtk%2Carr%2Chl2

The Unity build generates visual studio files without issues.

When opening with Visual Studio 2019, I do not see a Device target option under targets drop down.

However when I open in Visual Studio 2017, I do see the Device target option.

The visual studio 2019 menu looks completely different from what is in tutorials:

Please see screenshot below: enter image description here

Visual Studio 2017 is not supposed to work with hololens 2, and when I try to build in VS2017, it gives an error: MSB8020 The build tools for v142 (Platform Toolset = 'v142') cannot be found. I tried changing the build tools to 141 and 140 under project properties, but it strangely still gives the same error. The tutorial states minimum version required is Visual Studio 2019, so it is not supposed to work with an older version.

This is what Visual Studio 2019 is supposed to look like according to tutorial above enter image description here

I made sure device is connected and is in developer mode. This seems to be something missing in VS2019

Below are all the components I have installed based on the tutorial.

Can anyone help figure out why the Device or Remove Machine options are not showing up under Visual Studio 2019?

enter image description here enter image description here enter image description here


Solution 1:

I has the same problem, my solution was install all C++ development libraries

and set the UWP project on Visual studio to "Set As Startup Project".

enter image description here