Why does Visual Studio tell me that my Winui3 optional package is not a related set when I try to deploy it to PC for debug?

I wrote a simple Visual Studio solution with two projects. The first project is the main WinUI3 app, and the second is the optional package.

I deploy the main app on the PC successfully.

When I try to deploy the optional package, Visual Studio shows me an error:

DEP0700: App registration failed. [0x80073D17] The optional package with centennial content 666a4069-5d78-40ef-aeec-77e3061a3905_1.0.0.0_x64__z15vh46et9dgt is not in a related set. It must be in a related set specified by the parent package centennial e22754f5-41a4-44c0-9cfa-246a523e59a1_z15vh46et9dgt.

sample repository link: github.com/daniDevKr/OptionalPackagesSample_error/tree/540653b1ddc8ad0e6fff0331912a23a57f5cf2fb

Why does Visual Studio show me this error? And how can I solve the problem?

Read more here: Source link