c++ – Can’t get Visual Studio to allow access to the winrt::Microsoft::UI::Windowing namespace

I am running VS 2019. The project I am trying to create is a WinUI 3 app that is just one Window which contains a frame which is used to navigate over many pages. I have these nuget packages installed:

  1. Microsoft Project.Reunion
  2. Microsoft Project.Reunion.Foundation
  3. Microsoft Project.Reunion.WinUI
  4. Microsoft Windows.CppWinRT
  5. Microsoft Windows.SDK.BuildTools

I believe I need to install the Microsoft WindowsAppSDK to get that namespace. When I do install that nuget package, VS warns me that it was already installed times 3. Seems to be a conflict with something. Any ideas? Do I have the correct packages installed? Do I need other ones installed? Any help is appreciated.

I need access to AppWindow in this namespace so I can get access to the main window and change its size, get position, change the title and color the titlebar.

Read more here: Source link