Project references not resloved in a WinUI 3 C++ project
In the project PhotoEditor, why is there exclamation mark in the Reference, prompting "..... references could not be resolved"
The steps to reproduce are as follows
- Download this sample https://github.com/microsoft/WindowsAppSDK-Samples.git.
- Open WindowsAppSDK-Samples/Samples/PhotoEditor/cpp-winui/PhotoEditor.sln , then the references may be empty.
- Rebuild the project, close PhotoEditor.sln, and then reopen it.
- Check the references, you will find exclamation mark prompt.
- But if you choose the Microsoft.WindowsAppSDK version to 1.0.4, there is no exclamation mark.
My Visual Studio version:Visual Studio Community 2022 17.3.4.
This question comes from Microsoft Q&A (Project references in a WinUI 3 C++ project) and I would like to know how this problem can be solved.

The given references are being added via Microsoft.WindowsAppSDK.1.1.0\build\native\WindowsAppSDK-Nuget-Native.WinRt.props.
Attempted fixes included:
- Moving the above references into a targets file instead
- Adding <Implicit>true</Implicit> to the references
No change was observed with either (or both) of these fixes
As an experiment, moving the references into the vcxproj, with absolute paths, resolved the issue. So this issues is unique to transitive references in referenced packages.
Design time logs attached, created via env vars: set TRACEDESIGNTIME=true set _REFERENCE_DEBUG=true
Note that minimal repro doesn't require a build, just a nuget restore